Update rust and all deps
authorAlex Crichton <alex@alexcrichton.com>
Fri, 19 Dec 2014 18:38:32 +0000 (10:38 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 20 Dec 2014 04:55:17 +0000 (20:55 -0800)
59 files changed:
.travis.install.deps.sh
Cargo.lock
Cargo.toml
src/bin/cargo.rs
src/cargo/core/package_id.rs
src/cargo/core/registry.rs
src/cargo/core/resolver/encode.rs
src/cargo/core/source.rs
src/cargo/core/summary.rs
src/cargo/lib.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_new.rs
src/cargo/ops/cargo_package.rs
src/cargo/ops/cargo_rustc/custom_build.rs
src/cargo/ops/cargo_rustc/fingerprint.rs
src/cargo/ops/cargo_rustc/job.rs
src/cargo/ops/cargo_rustc/job_queue.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/registry.rs
src/cargo/sources/git/source.rs
src/cargo/sources/git/utils.rs
src/cargo/util/config.rs
src/cargo/util/dependency_queue.rs
src/cargo/util/errors.rs
src/cargo/util/profile.rs
src/cargo/util/sha256.rs
src/cargo/util/toml.rs
src/rustversion.txt
src/snapshots.txt
tests/resolve.rs
tests/support/paths.rs
tests/test_cargo.rs
tests/test_cargo_bench.rs
tests/test_cargo_build_auth.rs
tests/test_cargo_build_lib.rs
tests/test_cargo_clean.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_old_custom_build.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_compile_plugins.rs
tests/test_cargo_cross_compile.rs
tests/test_cargo_doc.rs
tests/test_cargo_features.rs
tests/test_cargo_fetch.rs
tests/test_cargo_freshness.rs
tests/test_cargo_generate_lockfile.rs
tests/test_cargo_new.rs
tests/test_cargo_package.rs
tests/test_cargo_profiles.rs
tests/test_cargo_publish.rs
tests/test_cargo_registry.rs
tests/test_cargo_run.rs
tests/test_cargo_search.rs
tests/test_cargo_test.rs
tests/test_cargo_version.rs
tests/test_shell.rs
tests/tests.rs

index 2c3b35d4e021fd67f32538c103939e276c668925..9f0b9c281435df30ac60601524402eff2d0ad7d4 100755 (executable)
@@ -63,7 +63,7 @@ else
     # Don't use the bundled gcc, see rust-lang/rust#17442
     rm -rf rustc/bin/rustlib/$triple/bin
     # Don't use bundled gcc libs, see rust-lang/rust#19519
-    rm -rf rustc/bin/rustlib/$triple/libmingw*.a
+    rm -rf rustc/bin/rustlib/$triple/lib/libmingw*.a
     rm -f rust-nightly-$triple.exe
 fi
 
index 87cebe5ba4ca46b9f376751e746501a3f9de2321..4327f02f2f2ba2eea209e00b4c0122faf7a5f667 100644 (file)
@@ -2,32 +2,33 @@
 name = "cargo"
 version = "0.1.0"
 dependencies = [
- "curl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.15 (git+https://github.com/alexcrichton/docopt.rs?ref=update)",
  "flate2 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
+ "log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "registry 0.1.0",
- "semver 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "tar 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tar 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "curl"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "curl-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "curl-sys"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -38,14 +39,17 @@ dependencies = [
 [[package]]
 name = "docopt"
 version = "0.6.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/docopt.rs?ref=update#ad176d540d344beb932cea8aa6270b92696a48bc"
+dependencies = [
+ "regex 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "flate2"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "miniz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "miniz-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -55,12 +59,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "git2"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libgit2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -75,7 +79,7 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#4ae58daf0b3a853ffd
 
 [[package]]
 name = "libgit2-sys"
-version = "0.1.1"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libssh2-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -109,9 +113,17 @@ dependencies = [
  "pkg-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "log"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "regex 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "miniz-sys"
-version = "0.1.0"
+version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -136,26 +148,31 @@ name = "pnacl-build-helper"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "regex"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
 [[package]]
 name = "registry"
 version = "0.1.0"
 dependencies = [
- "curl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "semver"
-version = "0.1.4"
+version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tar"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "time"
-version = "0.1.2"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -163,11 +180,11 @@ dependencies = [
 
 [[package]]
 name = "toml"
-version = "0.1.4"
+version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "url"
-version = "0.2.5"
+version = "0.2.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
index 716b87e7576f7d644304f5a71a776789559fc71c..644666e9b647e9c53810e95c776246d9561493ee 100644 (file)
@@ -10,7 +10,6 @@ name = "cargo"
 path = "src/cargo/lib.rs"
 
 [dependencies]
-docopt = "0.6.14"
 toml = "0.1.4"
 url = "0.2.0"
 semver = "0.1.0"
@@ -20,6 +19,11 @@ flate2 = "0.1.0"
 git2 = "0.1.0"
 glob = "0.1.0"
 time = "0.1.0"
+log = "0.1.0"
+
+[dependencies.docopt]
+git = "https://github.com/alexcrichton/docopt.rs"
+branch = "update"
 
 [dev-dependencies.hamcrest]
 git = "https://github.com/carllerche/hamcrest-rust.git"
index 3c52a8007a6dc176253670fd5abdfea7e9b2d125..c70448da5c1c6250067c35ad4e67d20ae80603a1 100644 (file)
@@ -53,33 +53,33 @@ fn main() {
     execute_main_without_stdin(execute, true, USAGE)
 }
 
-macro_rules! each_subcommand( ($macro:ident) => ({
-    $macro!(bench)
-    $macro!(build)
-    $macro!(clean)
-    $macro!(config_for_key)
-    $macro!(config_list)
-    $macro!(doc)
-    $macro!(fetch)
-    $macro!(generate_lockfile)
-    $macro!(git_checkout)
-    $macro!(help)
-    $macro!(locate_project)
-    $macro!(login)
-    $macro!(new)
-    $macro!(owner)
-    $macro!(package)
-    $macro!(pkgid)
-    $macro!(publish)
-    $macro!(read_manifest)
-    $macro!(run)
-    $macro!(search)
-    $macro!(test)
-    $macro!(update)
-    $macro!(verify_project)
-    $macro!(version)
-    $macro!(yank)
-}) )
+macro_rules! each_subcommand{ ($macro:ident) => ({
+    $macro!(bench);
+    $macro!(build);
+    $macro!(clean);
+    $macro!(config_for_key);
+    $macro!(config_list);
+    $macro!(doc);
+    $macro!(fetch);
+    $macro!(generate_lockfile);
+    $macro!(git_checkout);
+    $macro!(help);
+    $macro!(locate_project);
+    $macro!(login);
+    $macro!(new);
+    $macro!(owner);
+    $macro!(package);
+    $macro!(pkgid);
+    $macro!(publish);
+    $macro!(read_manifest);
+    $macro!(run);
+    $macro!(search);
+    $macro!(test);
+    $macro!(update);
+    $macro!(verify_project);
+    $macro!(version);
+    $macro!(yank);
+}) }
 
 /**
   The top-level `cargo` command handles configuration and project location
@@ -116,7 +116,7 @@ fn execute(flags: Flags, shell: &mut MultiShell) -> CliResult<Option<()>> {
     args.insert(0, command.to_string());
     args.insert(0, os::args()[0].clone());
 
-    macro_rules! cmd( ($name:ident) => (
+    macro_rules! cmd{ ($name:ident) => (
         if command.as_slice() == stringify!($name).replace("_", "-").as_slice() {
             mod $name;
             shell.set_verbose(true);
@@ -127,8 +127,8 @@ fn execute(flags: Flags, shell: &mut MultiShell) -> CliResult<Option<()>> {
             cargo::process_executed(r, shell);
             return Ok(None)
         }
-    ) )
-    each_subcommand!(cmd)
+    ) }
+    each_subcommand!(cmd);
 
     execute_subcommand(command.as_slice(), args.as_slice(), shell);
     Ok(None)
@@ -211,9 +211,9 @@ fn list_commands() -> TreeSet<String> {
         }
     }
 
-    macro_rules! add_cmd( ($cmd:ident) => ({
+    macro_rules! add_cmd{ ($cmd:ident) => ({
         commands.insert(stringify!($cmd).replace("_", "-"));
-    }) )
+    }) }
     each_subcommand!(add_cmd);
     commands
 }
index d70ecd076cc9974fa87806c044fcf6899d6ad1ff..f763d8ccc538710492d118813145c5c315ab7d19 100644 (file)
@@ -38,9 +38,11 @@ impl<E, D: Decoder<E>> Decodable<D, E> for PackageId {
         let regex = Regex::new(r"^([^ ]+) ([^ ]+) \(([^\)]+)\)$").unwrap();
         let captures = regex.captures(string.as_slice()).expect("invalid serialized PackageId");
 
-        let name = captures.at(1);
-        let version = semver::Version::parse(captures.at(2)).ok().expect("invalid version");
-        let source_id = SourceId::from_url(captures.at(3).to_string());
+        let name = captures.at(1).unwrap();
+        let version = captures.at(2).unwrap();
+        let url = captures.at(3).unwrap();
+        let version = semver::Version::parse(version).ok().expect("invalid version");
+        let source_id = SourceId::from_url(url.to_string());
 
         Ok(PackageId {
             inner: Arc::new(PackageIdInner {
index c2c89da5c869ca5941a6088418289308f2a05701..ab64c622c683b2faf431c1af89b6ad209980052a 100644 (file)
@@ -71,7 +71,7 @@ enum Kind {
 }
 
 impl<'a> PackageRegistry<'a> {
-    pub fn new<'a>(config: &'a Config<'a>) -> PackageRegistry<'a> {
+    pub fn new(config: &'a Config<'a>) -> PackageRegistry<'a> {
         PackageRegistry {
             sources: SourceMap::new(),
             source_ids: HashMap::new(),
index 3710f8003716d363e178179eef6b68071f903e26..f6670e1974d1ae6034ee9a57db93f3a1399ff141 100644 (file)
@@ -117,16 +117,12 @@ impl<E, D: Decoder<E>> Decodable<D, E> for EncodablePackageId {
         let captures = regex.captures(string.as_slice())
                             .expect("invalid serialized PackageId");
 
-        let name = captures.at(1);
-        let version = captures.at(2);
+        let name = captures.at(1).unwrap();
+        let version = captures.at(2).unwrap();
 
         let source = captures.at(3);
 
-        let source_id = if source == "" {
-            None
-        } else {
-            Some(SourceId::from_url(source.to_string()))
-        };
+        let source_id = source.map(|s| SourceId::from_url(s.to_string()));
 
         Ok(EncodablePackageId {
             name: name.to_string(),
index 18bdf650f53538115b46d4bf997743928321444a..e2347b19d78a75cc165cb218e085f0d0abd2d68c 100644 (file)
@@ -1,7 +1,6 @@
 use std::collections::hash_map::{HashMap, Values, MutEntries};
 use std::fmt::{mod, Show, Formatter};
 use std::hash;
-use std::iter;
 use std::mem;
 use std::sync::Arc;
 use serialize::{Decodable, Decoder, Encodable, Encoder};
@@ -325,10 +324,10 @@ pub struct SourceMap<'src> {
 }
 
 pub type Sources<'a, 'src> = Values<'a, SourceId, Box<Source+'src>>;
-pub type SourcesMut<'a, 'src> = iter::Map<'static, (&'a SourceId,
-                                                  &'a mut Box<Source+'src>),
-                                    (&'a SourceId, &'a mut (Source+'src)),
-                                    MutEntries<'a, SourceId, Box<Source+'src>>>;
+
+pub struct SourcesMut<'a, 'src: 'a> {
+    inner: MutEntries<'a, SourceId, Box<Source + 'src>>,
+}
 
 impl<'src> SourceMap<'src> {
     pub fn new() -> SourceMap<'src> {
@@ -374,7 +373,15 @@ impl<'src> SourceMap<'src> {
     }
 
     pub fn sources_mut<'a>(&'a mut self) -> SourcesMut<'a, 'src> {
-        self.map.iter_mut().map(|(k, v)| (k, &mut **v))
+        SourcesMut { inner: self.map.iter_mut() }
+    }
+}
+
+impl<'a, 'src> Iterator<(&'a SourceId, &'a mut (Source + 'src))>
+    for SourcesMut<'a, 'src>
+{
+    fn next(&mut self) -> Option<(&'a SourceId, &'a mut (Source + 'src))> {
+        self.inner.next().map(|(a, b)| (a, &mut **b))
     }
 }
 
index a30c65438ff51cb37bdda9226556677134ccb7fb..f750e00806f5d8563a16824dd616edf7e48c0d40 100644 (file)
@@ -97,7 +97,8 @@ impl Summary {
         self
     }
 
-    pub fn map_dependencies(mut self, f: |Dependency| -> Dependency) -> Summary {
+    pub fn map_dependencies<F>(mut self, f: F) -> Summary
+                               where F: FnMut(Dependency) -> Dependency {
         let deps = mem::replace(&mut self.dependencies, Vec::new());
         self.dependencies = deps.into_iter().map(f).collect();
         self
index 0c3459de9cc43a724ae8b9ef039871c9de653651..fb93f7b2afc6c254293c482460c85f350929cbee 100644 (file)
@@ -36,14 +36,14 @@ use term::color::{BLACK, RED};
 
 pub use util::{CargoError, CliError, CliResult, human};
 
-macro_rules! some(
+macro_rules! some {
     ($e:expr) => (
         match $e {
             Some(e) => e,
             None => return None
         }
     )
-)
+}
 
 // Added so that the try! macro below can refer to cargo::util, while
 // other external importers of this macro can use it as well.
@@ -54,7 +54,7 @@ mod cargo {
 }
 
 #[macro_export]
-macro_rules! try (
+macro_rules! try {
     ($expr:expr) => ({
         use cargo::util::FromError;
         match $expr.map_err(FromError::from_error) {
@@ -62,16 +62,16 @@ macro_rules! try (
             Err(err) => return Err(err)
         }
     })
-)
+}
 
-macro_rules! raw_try (
+macro_rules! raw_try {
     ($expr:expr) => ({
         match $expr {
             Ok(val) => val,
             Err(err) => return Err(err)
         }
     })
-)
+}
 
 pub mod core;
 pub mod ops;
index 9a4ddfeb678e965991dbecaf266c7e2a9a815f4b..cdfb92be039a1f363bf0098ce67e97837bb6cb11 100644 (file)
@@ -218,7 +218,7 @@ fn scrape_target_config(target: &HashMap<String, config::ConfigValue>,
             "ar" | "linker" => {
                 let v = try!(v.string().chain_error(|| {
                     internal(format!("invalid configuration for key `{}`", k))
-                })).ref0().to_string();
+                })).0.to_string();
                 if k.as_slice() == "linker" {
                     ret.linker = Some(v);
                 } else {
@@ -240,7 +240,7 @@ fn scrape_target_config(target: &HashMap<String, config::ConfigValue>,
                         internal(format!("invalid configuration for the key \
                                           `target.{}.{}.{}`", triple, lib_name,
                                           k))
-                    })).val0();
+                    })).0;
                     if k.as_slice() == "rustc-flags" {
                         let whence = format!("in `target.{}.{}.rustc-flags`",
                                              triple, lib_name);
index 3c7ac8a10b4d067dd972de2a3b61f41b515f4094..1fa52c7d1e6bed9f9a8e8f745eace0d720e73bf1 100644 (file)
@@ -147,7 +147,7 @@ fn global_config() -> CargoResult<CargoNewConfig> {
         Some(name) => {
             Some(try!(name.string().chain_error(|| {
                 internal("invalid configuration for key `cargo-new.name`")
-            })).ref0().to_string())
+            })).0.to_string())
         }
     };
     cfg.email = match cargo_new.get("email") {
@@ -155,7 +155,7 @@ fn global_config() -> CargoResult<CargoNewConfig> {
         Some(email) => {
             Some(try!(email.string().chain_error(|| {
                 internal("invalid configuration for key `cargo-new.email`")
-            })).ref0().to_string())
+            })).0.to_string())
         }
     };
     cfg.git = match cargo_new.get("git") {
@@ -163,7 +163,7 @@ fn global_config() -> CargoResult<CargoNewConfig> {
         Some(git) => {
             Some(try!(git.boolean().chain_error(|| {
                 internal("invalid configuration for key `cargo-new.git`")
-            })).val0())
+            })).0)
         }
     };
 
index 174f72f2e2660f1ca56612c6d312e1cf333d0ff1..482bc8433d27d0ee9e41835ab814bfee3d8507ca 100644 (file)
@@ -83,7 +83,7 @@ fn check_metadata(pkg: &Package, shell: &mut MultiShell) -> CargoResult<()> {
             )*
         }}
     }
-    lacking!(description, license || license_file, documentation || homepage || repository)
+    lacking!(description, license || license_file, documentation || homepage || repository);
 
     if !missing.is_empty() {
         let mut things = missing.slice_to(missing.len() - 1).connect(", ");
@@ -109,7 +109,7 @@ fn tar(pkg: &Package, src: &PathSource, shell: &mut MultiShell,
                                  dst.display())))
     }
 
-    try!(fs::mkdir_recursive(&dst.dir_path(), USER_DIR))
+    try!(fs::mkdir_recursive(&dst.dir_path(), USER_DIR));
 
     let tmpfile = try!(File::create(dst));
 
index ed03074861c6e1970bc15cb7acfe7d24b9cefb6c..2445a6294295fe70e867bf4edf2c088e65d3597d 100644 (file)
@@ -106,7 +106,7 @@ pub fn prepare(pkg: &Package, target: &Target, req: Platform,
     //
     // Note that this has to do some extra work just before running the command
     // to determine extra environment variables and such.
-    let work = proc(desc_tx: Sender<String>) {
+    let work = move |: desc_tx: Sender<String>| {
         // Make sure that OUT_DIR exists.
         //
         // If we have an old build directory, then just move it into place,
@@ -175,8 +175,11 @@ pub fn prepare(pkg: &Package, target: &Target, req: Platform,
     // Also note that a fresh build command needs to
     let (freshness, dirty, fresh) =
             try!(fingerprint::prepare_build_cmd(cx, pkg, Some(target)));
-    let dirty = proc(tx: Sender<String>) { try!(work(tx.clone())); dirty(tx) };
-    let fresh = proc(tx) {
+    let dirty = Work::new(move |tx: Sender<String>| {
+        try!(work(tx.clone()));
+        dirty.call(tx)
+    });
+    let fresh = Work::new(move |tx| {
         let (id, pkg_name, build_state, build_output) = all;
         let new_loc = build_output.dir_path().join("output");
         let mut f = try!(File::open(&new_loc).map_err(|e| {
@@ -187,8 +190,8 @@ pub fn prepare(pkg: &Package, target: &Target, req: Platform,
                                              pkg_name.as_slice()));
         build_state.insert(id, req, output);
 
-        fresh(tx)
-    };
+        fresh.call(tx)
+    });
 
     Ok((dirty, fresh, freshness))
 }
@@ -248,7 +251,7 @@ impl BuildOutput {
         let whence = format!("build script of `{}`", pkg_name);
 
         for line in input.lines() {
-            let mut iter = line.splitn(1, |c: char| c == ':');
+            let mut iter = line.splitn(1, |&: c: char| c == ':');
             if iter.next() != Some("cargo") {
                 // skip this line since it doesn't start with "cargo:"
                 continue;
@@ -259,7 +262,7 @@ impl BuildOutput {
             };
 
             // getting the `key=value` part of the line
-            let mut iter = data.splitn(1, |c: char| c == '=');
+            let mut iter = data.splitn(1, |&: c: char| c == '=');
             let key = iter.next();
             let value = iter.next();
             let (key, value) = match (key, value) {
index 455d5f44bfe927ad6ba90728e1dad75d26fa53d4..1075f8b7fb23e916946da5a0b2ec2cf2a614c59b 100644 (file)
@@ -134,7 +134,7 @@ pub fn prepare_build_cmd(cx: &mut Context, pkg: &Package,
     let kind = Kind::Target;
 
     if pkg.get_manifest().get_build().len() == 0 && target.is_none() {
-        return Ok((Fresh, proc(_) Ok(()), proc(_) Ok(())))
+        return Ok((Fresh, Work::noop(), Work::noop()));
     }
     let new = dir(cx, pkg, kind);
     let loc = new.join("build");
@@ -164,18 +164,18 @@ pub fn prepare_init(cx: &mut Context, pkg: &Package, kind: Kind)
     let new1 = dir(cx, pkg, kind);
     let new2 = new1.clone();
 
-    let work1 = proc(_) {
+    let work1 = Work::new(move |_| {
         if !new1.exists() {
             try!(fs::mkdir(&new1, io::USER_DIR));
         }
         Ok(())
-    };
-    let work2 = proc(_) {
+    });
+    let work2 = Work::new(move |_| {
         if !new2.exists() {
             try!(fs::mkdir(&new2, io::USER_DIR));
         }
         Ok(())
-    };
+    });
 
     (work1, work2)
 }
@@ -183,13 +183,13 @@ pub fn prepare_init(cx: &mut Context, pkg: &Package, kind: Kind)
 /// Given the data to build and write a fingerprint, generate some Work
 /// instances to actually perform the necessary work.
 fn prepare(is_fresh: bool, loc: Path, fingerprint: String) -> Preparation {
-    let write_fingerprint = proc(desc_tx) {
+    let write_fingerprint = Work::new(move |desc_tx| {
         drop(desc_tx);
         try!(File::create(&loc).write_str(fingerprint.as_slice()));
         Ok(())
-    };
+    });
 
-    (if is_fresh {Fresh} else {Dirty}, write_fingerprint, proc(_) Ok(()))
+    (if is_fresh {Fresh} else {Dirty}, write_fingerprint, Work::noop())
 }
 
 /// Return the (old, new) location for fingerprints for a package
index 889932a1aeae6545c297e535ea6e5c064da9fade..a76f3039e8ea38d03128a2da27a2aa8ebebdfdca 100644 (file)
@@ -4,7 +4,34 @@ pub struct Job { dirty: Work, fresh: Work }
 
 /// Each proc should send its description before starting.
 /// It should send either once or close immediatly.
-pub type Work = proc(Sender<String>):Send -> CargoResult<()>;
+pub struct Work {
+    inner: Box<FnBox<Sender<String>, CargoResult<()>> + Send>,
+}
+
+trait FnBox<A, R> {
+    fn call_box(self: Box<Self>, a: A) -> R;
+}
+
+impl<A, R, F: FnOnce(A) -> R> FnBox<A, R> for F {
+    fn call_box(self: Box<F>, a: A) -> R {
+        (*self)(a)
+    }
+}
+
+impl Work {
+    pub fn new<F>(f: F) -> Work
+                  where F: FnOnce(Sender<String>) -> CargoResult<()> + Send {
+        Work { inner: box f }
+    }
+
+    pub fn noop() -> Work {
+        Work::new(|_| Ok(()))
+    }
+
+    pub fn call(self, tx: Sender<String>) -> CargoResult<()> {
+        self.inner.call_box(tx)
+    }
+}
 
 impl Job {
     /// Create a new job representing a unit of work.
@@ -20,15 +47,15 @@ impl Job {
     /// describe itself to the console.
     pub fn noop(_dirty: Work,
                 fresh: Work) -> Job {
-        Job { dirty: proc(_) Ok(()), fresh: fresh }
+        Job { dirty: Work::noop(), fresh: fresh }
     }
 
     /// Consumes this job by running it, returning the result of the
     /// computation.
     pub fn run(self, fresh: Freshness, tx: Sender<String>) -> CargoResult<()> {
         match fresh {
-            Fresh => (self.fresh)(tx),
-            Dirty => (self.dirty)(tx),
+            Fresh => self.fresh.call(tx),
+            Dirty => self.dirty.call(tx),
         }
     }
 }
index 221dbdec68953ee413182eb5e25fda1c5f16b701..07ddf302c8760b52c14b3424b6e1e55d7230aaeb 100644 (file)
@@ -182,7 +182,7 @@ impl<'a, 'b> JobQueue<'a, 'b> {
             let my_tx = self.tx.clone();
             let id = id.clone();
             let (desc_tx, desc_rx) = channel();
-            self.pool.execute(proc() {
+            self.pool.execute(move|| {
                 my_tx.send((id, stage, fresh, job.run(fresh, desc_tx)));
             });
             // only the first message of each job is processed
index 8f8056cda9fa62f29d8684d9e9665309a02213a3..c08e060c6d8e42e22936728d9ade9d0b6e3c1ead 100644 (file)
@@ -226,10 +226,10 @@ fn compile<'a, 'b>(targets: &[&'a Target], pkg: &'a Package,
             let (freshness, dirty, fresh) =
                 try!(fingerprint::prepare_target(cx, pkg, target, kind));
 
-            let dirty = proc(desc_tx: Sender<String>) {
-                try!(work(desc_tx.clone()));
-                dirty(desc_tx)
-            };
+            let dirty = Work::new(move |desc_tx: Sender<String>| {
+                try!(work.call(desc_tx.clone()));
+                dirty.call(desc_tx)
+            });
             dst.push((job(dirty, fresh), freshness));
         }
 
@@ -296,13 +296,15 @@ fn compile<'a, 'b>(targets: &[&'a Target], pkg: &'a Package,
             1 => pkg.get_manifest().get_build()[0].to_string(),
             _ => format!("custom build commands"),
         };
-        let dirty = proc(desc_tx: Sender<String>) {
+        let dirty = Work::new(move |desc_tx: Sender<String>| {
             if desc.len() > 0 {
                 desc_tx.send_opt(desc).ok();
             }
-            for cmd in build_cmds.into_iter() { try!(cmd(desc_tx.clone())) }
-            dirty(desc_tx)
-        };
+            for cmd in build_cmds.into_iter() {
+                try!(cmd.call(desc_tx.clone()))
+            }
+            dirty.call(desc_tx)
+        });
         jobs.enqueue(pkg, Stage::BuildCustomBuild, vec![]);
         jobs.enqueue(pkg, Stage::RunCustomBuild, vec![(job(dirty, fresh),
                                                          freshness)]);
@@ -371,7 +373,7 @@ fn compile_custom_old(pkg: &Package, cmd: &str,
     }
     let pkg = pkg.to_string();
 
-    Ok(proc(desc_tx: Sender<String>) {
+    Ok(Work::new(move |desc_tx: Sender<String>| {
         desc_tx.send_opt(p.to_string()).ok();
         if first && !output.exists() {
             try!(fs::mkdir(&output, USER_RWX).chain_error(|| {
@@ -384,7 +386,7 @@ fn compile_custom_old(pkg: &Package, cmd: &str,
             e.concrete().mark_human()
         }));
         Ok(())
-    })
+    }))
 }
 
 fn rustc(package: &Package, target: &Target,
@@ -443,7 +445,7 @@ fn rustc(package: &Package, target: &Target,
             t.is_lib()
         });
 
-        Ok((proc(desc_tx: Sender<String>) {
+        Ok((Work::new(move |desc_tx: Sender<String>| {
             let mut rustc = rustc;
 
             // Only at runtime have we discovered what the extra -L and -l
@@ -479,7 +481,7 @@ fn rustc(package: &Package, target: &Target,
 
             Ok(())
 
-        }, kind))
+        }), kind))
     }).collect()
 }
 
@@ -539,7 +541,7 @@ fn rustdoc(package: &Package, target: &Target,
     let primary = package.get_package_id() == cx.resolve.root();
     let name = package.get_name().to_string();
     let desc = rustdoc.to_string();
-    Ok(proc(desc_tx: Sender<String>) {
+    Ok(Work::new(move |desc_tx: Sender<String>| {
         desc_tx.send(desc);
         if primary {
             try!(rustdoc.exec().chain_error(|| {
@@ -559,7 +561,7 @@ fn rustdoc(package: &Package, target: &Target,
             }))
         }
         Ok(())
-    })
+    }))
 }
 
 fn build_base_args(cx: &Context,
index 3886b4d6c9775ca19308f124d24d1062c461f467..e793a06ca4f0c90ed6b117530a89731d4524c6b1 100644 (file)
@@ -140,7 +140,7 @@ pub fn registry_configuration() -> CargoResult<RegistryConfig> {
         Some(index) => {
             Some(try!(index.string().chain_error(|| {
                 internal("invalid configuration for key `index`")
-            })).ref0().to_string())
+            })).0.to_string())
         }
     };
     let token = match registry.get("token") {
@@ -148,7 +148,7 @@ pub fn registry_configuration() -> CargoResult<RegistryConfig> {
         Some(token) => {
             Some(try!(token.string().chain_error(|| {
                 internal("invalid configuration for key `token`")
-            })).ref0().to_string())
+            })).0.to_string())
         }
     };
     Ok(RegistryConfig { index: index, token: token })
@@ -201,7 +201,7 @@ pub fn http_proxy() -> CargoResult<Option<String>> {
                 Some(proxy) => {
                     return Ok(Some(try!(proxy.string().chain_error(|| {
                         internal("invalid configuration for key `http.proxy`")
-                    })).ref0().to_string()))
+                    })).0.to_string()))
                 }
                 None => {},
             }
@@ -374,7 +374,7 @@ pub fn search(query: &str, shell: &mut MultiShell, index: Option<String>) -> Car
                 let space = String::from_char(
                     description_margin - name.len(),
                     ' ');
-                name + space + desc
+                name.to_string() + space.as_slice() + desc.as_slice()
             }
             None => name
         };
index cce8cb2122ad0d2d5576c14e8d8987f952cc55b4..2e7fb50b91e2ebc8c9902c2ff4d6f8c7d3968501 100644 (file)
@@ -24,8 +24,8 @@ pub struct GitSource<'a, 'b:'a> {
 }
 
 impl<'a, 'b> GitSource<'a, 'b> {
-    pub fn new<'a, 'b>(source_id: &SourceId,
-                       config: &'a Config<'b>) -> GitSource<'a, 'b> {
+    pub fn new(source_id: &SourceId,
+               config: &'a Config<'b>) -> GitSource<'a, 'b> {
         assert!(source_id.is_git(), "id is not git, id={}", source_id);
 
         let reference = match source_id.git_reference() {
index 38e23bc8af6c59a8d4f9ea714603da064f2db61a..5631af7f44fd716457998a137808f42807ceacab 100644 (file)
@@ -227,9 +227,9 @@ impl GitDatabase {
 }
 
 impl<'a> GitCheckout<'a> {
-    fn new<'a>(path: &Path, database: &'a GitDatabase, revision: GitRevision,
-               repo: git2::Repository)
-               -> GitCheckout<'a>
+    fn new(path: &Path, database: &'a GitDatabase, revision: GitRevision,
+           repo: git2::Repository)
+           -> GitCheckout<'a>
     {
         GitCheckout {
             location: path.clone(),
@@ -239,9 +239,9 @@ impl<'a> GitCheckout<'a> {
         }
     }
 
-    fn clone_into<'a>(into: &Path, database: &'a GitDatabase,
-                      revision: GitRevision)
-                      -> CargoResult<GitCheckout<'a>>
+    fn clone_into(into: &Path, database: &'a GitDatabase,
+                  revision: GitRevision)
+                  -> CargoResult<GitCheckout<'a>>
     {
         let repo = try!(GitCheckout::clone_repo(database.get_path(), into));
         let checkout = GitCheckout::new(into, database, revision, repo);
index f49ce854454fc120531d0a2bd44b56c9abcfe2b0..a796bb38099312af0402a62bb9b6bff642dc794b 100644 (file)
@@ -26,9 +26,9 @@ pub struct Config<'a> {
 }
 
 impl<'a> Config<'a> {
-    pub fn new<'a>(shell: &'a mut MultiShell,
-                   jobs: Option<uint>,
-                   target: Option<string::String>) -> CargoResult<Config<'a>> {
+    pub fn new(shell: &'a mut MultiShell,
+               jobs: Option<uint>,
+               target: Option<string::String>) -> CargoResult<Config<'a>> {
         if jobs == Some(0) {
             return Err(human("jobs must be at least 1"))
         }
@@ -134,7 +134,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for ConfigValue {
         match *self {
             CV::String(ref string, _) => string.encode(s),
             CV::List(ref list) => {
-                let list: Vec<&string::String> = list.iter().map(|s| s.ref0()).collect();
+                let list: Vec<&string::String> = list.iter().map(|s| &s.0).collect();
                 list.encode(s)
             }
             CV::Table(ref table) => table.encode(s),
index 3f2414e180171ef71f95fb5b53c8d013675c7777..8e868b4a4133f50260d37a19f88ff87f9a88a467 100644 (file)
@@ -127,7 +127,7 @@ impl<C, K: Dependency<C>, V> DependencyQueue<K, V> {
             if fresh == Dirty {
                 self.dirty.insert(dep.clone());
             }
-            assert!(self.dep_map[*dep].mut0().remove(key));
+            assert!(self.dep_map[*dep].0.remove(key));
         }
     }
 }
index 935a8ef4b6c5619ec79913548af5e518376078cb..32fcf1e879b62bf4a922b1345b76b752feec74eb 100644 (file)
@@ -37,7 +37,7 @@ impl<E: CargoError> FromError<E> for Box<CargoError> {
     }
 }
 
-macro_rules! from_error (
+macro_rules! from_error {
     ($ty:ty) => {
         impl FromError<$ty> for $ty {
             fn from_error(error: $ty) -> $ty {
@@ -45,7 +45,7 @@ macro_rules! from_error (
             }
         }
     }
-)
+}
 
 impl Show for Box<CargoError> {
     fn fmt(&self, f: &mut Formatter) -> fmt::Result {
@@ -99,13 +99,13 @@ impl CargoError for IoError {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(IoError)
+from_error!(IoError);
 
 impl CargoError for TomlError {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(TomlError)
+from_error!(TomlError);
 
 impl CargoError for fmt::Error {
     fn description(&self) -> String {
@@ -113,19 +113,19 @@ impl CargoError for fmt::Error {
     }
 }
 
-from_error!(fmt::Error)
+from_error!(fmt::Error);
 
 impl CargoError for curl::ErrCode {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(curl::ErrCode)
+from_error!(curl::ErrCode);
 
 impl CargoError for json::DecoderError {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(json::DecoderError)
+from_error!(json::DecoderError);
 
 pub struct ProcessError {
     pub msg: String,
@@ -135,7 +135,7 @@ pub struct ProcessError {
     pub cause: Option<Box<CargoError>>
 }
 
-from_error!(ProcessError)
+from_error!(ProcessError);
 
 impl Show for ProcessError {
     fn fmt(&self, f: &mut Formatter) -> fmt::Result {
@@ -247,7 +247,7 @@ impl CargoError for CliError {
     }
 }
 
-from_error!(CliError)
+from_error!(CliError);
 
 impl CargoError for docopt::Error {
     fn description(&self) -> String {
@@ -269,19 +269,19 @@ impl CargoError for docopt::Error {
     fn is_human(&self) -> bool { true }
 }
 
-from_error!(docopt::Error)
+from_error!(docopt::Error);
 
 impl CargoError for url::ParseError {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(url::ParseError)
+from_error!(url::ParseError);
 
 impl CargoError for git2::Error {
     fn description(&self) -> String { self.to_string() }
 }
 
-from_error!(git2::Error)
+from_error!(git2::Error);
 
 impl CliError {
     pub fn new<S: Str>(error: S, code: uint) -> CliError {
index 17ec7700b6beb3eb2612215399b4c6be588d6074..c82c07cf3143762c1fc4a15a33eaf289ff223f63 100644 (file)
@@ -4,8 +4,8 @@ use std::fmt::Show;
 use time;
 use std::cell::RefCell;
 
-thread_local!(static PROFILE_STACK: RefCell<Vec<u64>> = RefCell::new(Vec::new()))
-thread_local!(static MESSAGES: RefCell<Vec<Message>> = RefCell::new(Vec::new()))
+thread_local!(static PROFILE_STACK: RefCell<Vec<u64>> = RefCell::new(Vec::new()));
+thread_local!(static MESSAGES: RefCell<Vec<Message>> = RefCell::new(Vec::new()));
 
 type Message = (uint, u64, String);
 
index 19a24a8dcd4546141a2f11d7acd0f001d50dfb48..88419ae15e14dfe652769d42eb106d5fd4cff56b 100644 (file)
@@ -107,11 +107,11 @@ mod imp {
         fn CryptDestroyHash(hHash: HCRYPTHASH) -> BOOL;
     }
 
-    macro_rules! call( ($e:expr) => ({
+    macro_rules! call{ ($e:expr) => ({
         if $e == 0 {
             panic!("failed {}: {}", stringify!($e), os::last_os_error())
         }
-    }) )
+    }) }
 
     pub struct Sha256 {
         hcryptprov: HCRYPTPROV,
index 6bcbdef217ac76986bf3aa41a3f58b3308824aed..762e32d1346247079838ddec923cea581ff85fe3 100644 (file)
@@ -133,7 +133,7 @@ pub fn to_manifest(contents: &[u8],
                     add_unused_keys(m, v, if key.len() == 0 {
                         k.clone()
                     } else {
-                        key + "." + k.as_slice()
+                        key.clone() + "." + k.as_slice()
                     })
                 }
             }
index 75053c92f9864eba40457f4b637ee82d79fd58b6..e4c3aa63cd174d0ac92ba9b07503ec62c9a850d6 100644 (file)
@@ -1 +1 @@
-2014-12-15
+2014-12-19
index 196e3595215909e6f2618b0e5b032f6d926db73b..c20fbde3fda5f72587e4c3b206ba17bae51b76a3 100644 (file)
@@ -1,3 +1,11 @@
+2014-12-20
+  linux-i386 1cccab5a6ac8e73472bf78cdce019cd1a60d4638
+  linux-x86_64 53c176fcda0a40fb77b901303c443de3dce3e58d
+  macos-i386 bbc23c78ca4307efa6250552a097e6b2ccfe2cc3
+  macos-x86_64 4f97a30408c99858ad2b7a7f6edfe3d5b8f0ff3f
+  winnt-i386 5d77cd604b011100398023e8dc3d98c173247874
+  winnt-x86_64 1290dcc2a51e99027803d641c08299abe1265158
+
 2014-12-18
   linux-i386 30eec547395093ab9c6a0587a3210666b9272815
   linux-x86_64 20d13252996838680f4356a7addd75403bb11aec
index eede8d6eb72653884fe3f15f0c19a44ffde29733..7fe4ffd53ca0880b54ebf932b54551f9ffd2db25 100644 (file)
@@ -58,7 +58,7 @@ impl ToPkgId for (&'static str, &'static str) {
     }
 }
 
-macro_rules! pkg(
+macro_rules! pkg {
     ($pkgid:expr => [$($deps:expr),+]) => ({
         let d: Vec<Dependency> = vec![$($deps.to_dep()),+];
 
@@ -68,7 +68,7 @@ macro_rules! pkg(
     ($pkgid:expr) => (
         Summary::new($pkgid.to_pkgid(), Vec::new(), HashMap::new()).unwrap()
     )
-)
+}
 
 fn registry_loc() -> SourceId {
     let remote = "http://example.com".to_url().unwrap();
index 0dde546359d2bf868312066c5c84df2990071125..f5b701dcd33fa75a753630907dbe44065f7fa579 100644 (file)
@@ -7,7 +7,7 @@ use cargo::util::realpath;
 
 static CARGO_INTEGRATION_TEST_DIR : &'static str = "cit";
 static NEXT_ID: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
-thread_local!(static TASK_ID: uint = NEXT_ID.fetch_add(1, atomic::SeqCst))
+thread_local!(static TASK_ID: uint = NEXT_ID.fetch_add(1, atomic::SeqCst));
 
 pub fn root() -> Path {
     let path = os::self_exe_path().unwrap()
index 513c698b2110ab525a9cc057ca78f731626431a1..773754d699c831450917da474ccadc61b41fa5f5 100644 (file)
@@ -46,7 +46,7 @@ test!(list_commands_looks_at_path {
     let output = output.exec_with_output().assert();
     let output = str::from_utf8(output.output.as_slice()).assert();
     assert!(output.contains("\n    1\n"), "missing 1: {}", output);
-})
+});
 
 test!(find_closest_biuld_to_build {
     let pr = process(cargo_dir().join("cargo")).unwrap()
@@ -60,7 +60,7 @@ test!(find_closest_biuld_to_build {
 Did you mean `build`?
 
 "));
-})
+});
 
 // if a subcommand is more than 3 edit distance away, we don't make a suggestion
 test!(find_closest_dont_correct_nonsense {
@@ -72,4 +72,4 @@ test!(find_closest_dont_correct_nonsense {
                 execs().with_status(127)
                        .with_stderr("No such subcommand
 "));
-})
+});
index 18d92de92ceb2d2b8c2653c2ef9006287dd1308c..ee957e80f641e7f19a11cdf8a14dfdc53288fea2 100644 (file)
@@ -48,7 +48,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
         COMPILING, p.url(),
         RUNNING)));
-})
+});
 
 test!(bench_target_name {
     let prj = project("foo")
@@ -89,7 +89,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
     assert_that(prj.cargo_process("bench").arg("--bench").arg("bin2"),
         execs().with_status(0).with_stdout(expected_stdout.as_slice()));
-})
+});
 
 test!(cargo_bench_verbose {
     let p = project("foo")
@@ -113,7 +113,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
         compiling = COMPILING, url = p.url(), running = RUNNING)));
-})
+});
 
 test!(many_similar_names {
     let p = project("foo")
@@ -145,7 +145,7 @@ test!(many_similar_names {
     assert!(output.contains("test bin_bench"), "bin_bench missing\n{}", output);
     assert!(output.contains("test lib_bench"), "lib_bench missing\n{}", output);
     assert!(output.contains("test bench_bench"), "bench_bench missing\n{}", output);
-})
+});
 
 test!(cargo_bench_failing_test {
     let p = project("foo")
@@ -186,7 +186,7 @@ task '<main>' panicked at 'assertion failed: \
     `hello`, right: `nope`)', src{sep}foo.rs:13
 ", sep = path::SEP))
               .with_status(101));
-})
+});
 
 test!(bench_with_lib_dep {
     let p = project("foo")
@@ -242,7 +242,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
         COMPILING, p.url(), running = RUNNING)))
-})
+});
 
 test!(bench_with_deep_lib_dep {
     let p = project("bar")
@@ -295,7 +295,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(external_bench_explicit {
     let p = project("foo")
@@ -343,7 +343,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
         COMPILING, p.url(), running = RUNNING)))
-})
+});
 
 test!(external_bench_implicit {
     let p = project("foo")
@@ -388,7 +388,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
         COMPILING, p.url(), running = RUNNING)))
-})
+});
 
 test!(dont_run_examples {
     let p = project("foo")
@@ -405,7 +405,7 @@ test!(dont_run_examples {
         "#);
     assert_that(p.cargo_process("bench"),
                 execs().with_status(0));
-})
+});
 
 test!(pass_through_command_line {
     let p = project("foo")
@@ -451,7 +451,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 // Regression test for running cargo-bench twice with
 // tests in an rlib
@@ -473,7 +473,7 @@ test!(cargo_bench_twice {
         assert_that(p.process(cargo_dir().join("cargo")).arg("bench"),
                     execs().with_status(0));
     }
-})
+});
 
 test!(lib_bin_same_name {
     let p = project("foo")
@@ -519,7 +519,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
         COMPILING, p.url(), running = RUNNING)))
-})
+});
 
 test!(lib_with_standard_name {
     let p = project("foo")
@@ -569,7 +569,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(lib_with_standard_name2 {
     let p = project("foo")
@@ -611,7 +611,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(bin_there_for_integration {
     let p = project("foo")
@@ -644,7 +644,7 @@ test!(bin_there_for_integration {
     assert!(output.contains("bench_bench ... bench:         0 ns/iter (+/- 0)"),
                             "no bench_bench\n{}",
                             output);
-})
+});
 
 #[cfg(not(windows))] // FIXME(#456)
 test!(bench_dylib {
@@ -741,7 +741,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 ",
                        fresh = FRESH, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(bench_twice_with_build_cmd {
     let p = project("foo")
@@ -785,4 +785,4 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
 
 ",
                        running = RUNNING)));
-})
+});
index f2a002f1ec404e67d1a6459cb1f252f3dfe5785e..80deaa2165557838688f7924bec013a6d63b1b9b 100644 (file)
@@ -38,7 +38,7 @@ test!(http_auth_offered {
            .collect()
     }
 
-    spawn(proc() {
+    spawn(move|| {
         let mut s = BufferedStream::new(a.accept().unwrap());
         let req = headers(&mut s);
         s.write(b"\
@@ -123,7 +123,7 @@ Caused by:
         addr = addr)));
 
     rx.recv();
-})
+});
 
 // Boy, sure would be nice to have a TLS implementation in rust!
 test!(https_something_happens {
@@ -133,7 +133,7 @@ test!(https_something_happens {
     let a2 = a.clone();
     let _c = Closer { a: a2 };
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         drop(a.accept().unwrap());
 
         tx.send(());
@@ -176,7 +176,7 @@ Caused by:
         })));
 
     rx.recv();
-})
+});
 
 // Boy, sure would be nice to have an SSH implementation in rust!
 test!(ssh_something_happens {
@@ -186,7 +186,7 @@ test!(ssh_something_happens {
     let a2 = a.clone();
     let _c = Closer { a: a2 };
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         drop(a.accept().unwrap());
 
         tx.send(());
@@ -223,4 +223,4 @@ Caused by:
         addr = addr)));
 
     rx.recv();
-})
+});
index 2b3c1b302afb62ed58208fff339cbef8ba35ca45..aab74fd117d96aa1925f3f8b591a925a673cae13 100644 (file)
@@ -40,7 +40,7 @@ test!(build_lib_only {
                 execs()
                 .with_status(0)
                 .with_stdout(verbose_output_for_lib(&p)));
-})
+});
 
 
 test!(build_with_no_lib {
@@ -54,4 +54,4 @@ test!(build_with_no_lib {
                 execs()
                 .with_status(101)
                 .with_stderr("There is no lib to build, remove `--lib` flag"));
-})
+});
index c45035a3d4ed555737f3d8cb2d638928a7ec7282..ca6b8a17ffb5bbf9e68d8d164b21aa9c8bd6a616 100644 (file)
@@ -15,7 +15,7 @@ test!(cargo_clean_simple {
     assert_that(p.process(cargo_dir().join("cargo")).arg("clean"),
                 execs().with_status(0));
     assert_that(&p.build_dir(), is_not(existing_dir()));
-})
+});
 
 test!(different_dir {
     let p = project("foo")
@@ -30,4 +30,4 @@ test!(different_dir {
                  .cwd(p.root().join("src")),
                 execs().with_status(0).with_stdout(""));
     assert_that(&p.build_dir(), is_not(existing_dir()));
-})
+});
index b87f080361f9d1f5050678b13e37abe082b49726..817bcc251d0ea78fce49d7dc342ac3243de74fd0 100644 (file)
@@ -22,7 +22,7 @@ test!(cargo_compile_simple {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("i am foo\n"));
-})
+});
 
 test!(cargo_compile_manifest_path {
     let p = project("foo")
@@ -34,7 +34,7 @@ test!(cargo_compile_manifest_path {
                  .cwd(p.root().dir_path()),
                 execs().with_status(0));
     assert_that(&p.bin("foo"), existing_file());
-})
+});
 
 test!(cargo_compile_with_invalid_manifest {
     let p = project("foo")
@@ -45,7 +45,7 @@ test!(cargo_compile_with_invalid_manifest {
         .with_status(101)
         .with_stderr("Cargo.toml is not a valid manifest\n\n\
                       No `package` or `project` section found.\n"))
-})
+});
 
 test!(cargo_compile_with_invalid_manifest2 {
     let p = project("foo")
@@ -59,7 +59,7 @@ test!(cargo_compile_with_invalid_manifest2 {
         .with_status(101)
         .with_stderr("could not parse input TOML\n\
                       Cargo.toml:3:19-3:20 expected a value\n\n"))
-})
+});
 
 test!(cargo_compile_with_invalid_manifest3 {
     let p = project("foo")
@@ -77,7 +77,7 @@ test!(cargo_compile_with_invalid_manifest3 {
         .with_status(101)
         .with_stderr("could not parse input TOML\n\
                       src[..]Cargo.toml:1:5-1:6 expected a value\n\n"))
-})
+});
 
 test!(cargo_compile_with_invalid_version {
     let p = project("foo")
@@ -95,7 +95,7 @@ test!(cargo_compile_with_invalid_version {
                               cannot parse '1.0' as a semver for the key \
                               `project.version`\n"))
 
-})
+});
 
 test!(cargo_compile_without_manifest {
     let tmpdir = TempDir::new("cargo").unwrap();
@@ -106,7 +106,7 @@ test!(cargo_compile_without_manifest {
         .with_status(102)
         .with_stderr("Could not find Cargo.toml in this directory or any \
                       parent directory\n"));
-})
+});
 
 test!(cargo_compile_with_invalid_code {
     let p = project("foo")
@@ -125,7 +125,7 @@ Could not compile `foo`.
 To learn more, run the command again with --verbose.\n",
             filename = format!("src{}foo.rs", path::SEP)).as_slice()));
     assert_that(&p.root().join("Cargo.lock"), existing_file());
-})
+});
 
 test!(cargo_compile_with_invalid_code_in_deps {
     let p = project("foo")
@@ -150,7 +150,7 @@ test!(cargo_compile_with_invalid_code_in_deps {
     bar.build();
     baz.build();
     assert_that(p.cargo_process("build"), execs().with_status(101));
-})
+});
 
 test!(cargo_compile_with_warnings_in_the_root_package {
     let p = project("foo")
@@ -165,7 +165,7 @@ on by default
 {filename}:1 fn main() {{}} fn dead() {{}}
                           ^~~~~~~~~~~~
 ", filename = format!("src{}foo.rs", path::SEP).as_slice())));
-})
+});
 
 test!(cargo_compile_with_warnings_in_a_dep_package {
     let mut p = project("foo");
@@ -223,7 +223,7 @@ test!(cargo_compile_with_warnings_in_a_dep_package {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 test!(cargo_compile_with_nested_deps_inferred {
     let p = project("foo")
@@ -281,7 +281,7 @@ test!(cargo_compile_with_nested_deps_inferred {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 test!(cargo_compile_with_nested_deps_correct_bin {
     let p = project("foo")
@@ -339,7 +339,7 @@ test!(cargo_compile_with_nested_deps_correct_bin {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 test!(cargo_compile_with_nested_deps_shorthand {
     let p = project("foo")
@@ -406,7 +406,7 @@ test!(cargo_compile_with_nested_deps_shorthand {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 test!(cargo_compile_with_nested_deps_longhand {
     let p = project("foo")
@@ -473,7 +473,7 @@ test!(cargo_compile_with_nested_deps_longhand {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 // Check that Cargo gives a sensible error if a dependency can't be found
 // because of a name mismatch.
@@ -504,7 +504,7 @@ r#"no package named `notquitebar` found (required by `foo`)
 location searched: {proj_dir}
 version required: *
 "#, proj_dir = p.url())));
-})
+});
 
 // test!(compiling_project_with_invalid_manifest)
 
@@ -553,7 +553,7 @@ test!(crate_version_env_vars {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("test"),
                 execs().with_status(0));
-})
+});
 
 // this is testing that src/<pkg-name>.rs still works (for now)
 test!(many_crate_types_old_style_lib_location {
@@ -592,7 +592,7 @@ test!(many_crate_types_old_style_lib_location {
     assert!(file0.ends_with(".rlib") || file1.ends_with(".rlib"));
     assert!(file0.ends_with(os::consts::DLL_SUFFIX) ||
             file1.ends_with(os::consts::DLL_SUFFIX));
-})
+});
 
 test!(many_crate_types_correct {
     let mut p = project("foo");
@@ -630,7 +630,7 @@ test!(many_crate_types_correct {
     assert!(file0.ends_with(".rlib") || file1.ends_with(".rlib"));
     assert!(file0.ends_with(os::consts::DLL_SUFFIX) ||
             file1.ends_with(os::consts::DLL_SUFFIX));
-})
+});
 
 test!(unused_keys {
     let mut p = project("foo");
@@ -674,7 +674,7 @@ test!(unused_keys {
     assert_that(p.cargo_process("build"),
                 execs().with_status(0)
                        .with_stderr("unused manifest key: lib.build\n"));
-})
+});
 
 test!(self_dependency {
     let mut p = project("foo");
@@ -697,7 +697,7 @@ test!(self_dependency {
         .file("src/test.rs", "fn main() {}");
     assert_that(p.cargo_process("build"),
                 execs().with_status(0));
-})
+});
 
 #[cfg(not(windows))]
 test!(ignore_broken_symlinks {
@@ -712,7 +712,7 @@ test!(ignore_broken_symlinks {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("i am foo\n"));
-})
+});
 
 test!(missing_lib_and_bin {
     let mut p = project("foo");
@@ -728,7 +728,7 @@ test!(missing_lib_and_bin {
                 execs().with_status(101)
                        .with_stderr("either a [lib] or [[bin]] section \
                                      must be present\n"));
-})
+});
 
 test!(lto_build {
     let mut p = project("foo");
@@ -760,7 +760,7 @@ running = RUNNING, compiling = COMPILING, sep = path::SEP,
 dir = p.root().display(),
 url = p.url(),
 )));
-})
+});
 
 test!(verbose_build {
     let mut p = project("foo");
@@ -788,7 +788,7 @@ running = RUNNING, compiling = COMPILING, sep = path::SEP,
 dir = p.root().display(),
 url = p.url(),
 )));
-})
+});
 
 test!(verbose_release_build {
     let mut p = project("foo");
@@ -818,7 +818,7 @@ running = RUNNING, compiling = COMPILING, sep = path::SEP,
 dir = p.root().display(),
 url = p.url(),
 )));
-})
+});
 
 test!(verbose_release_build_deps {
     let mut p = project("foo");
@@ -880,7 +880,7 @@ test!(verbose_release_build_deps {
                     sep = path::SEP,
                     prefix = os::consts::DLL_PREFIX,
                     suffix = os::consts::DLL_SUFFIX).as_slice()));
-})
+});
 
 test!(explicit_examples {
     let mut p = project("world");
@@ -921,7 +921,7 @@ test!(explicit_examples {
                         execs().with_stdout("Hello, World!\n"));
     assert_that(process(p.bin("examples/goodbye")).unwrap(),
                         execs().with_stdout("Goodbye, World!\n"));
-})
+});
 
 test!(implicit_examples {
     let mut p = project("world");
@@ -950,7 +950,7 @@ test!(implicit_examples {
                 execs().with_stdout("Hello, World!\n"));
     assert_that(process(p.bin("examples/goodbye")).unwrap(),
                 execs().with_stdout("Goodbye, World!\n"));
-})
+});
 
 test!(standard_build_no_ndebug {
     let p = project("world")
@@ -967,7 +967,7 @@ test!(standard_build_no_ndebug {
 
     assert_that(p.cargo_process("build"), execs().with_status(0));
     assert_that(process(p.bin("foo")).unwrap(), execs().with_stdout("slow\n"));
-})
+});
 
 test!(release_build_ndebug {
     let p = project("world")
@@ -985,7 +985,7 @@ test!(release_build_ndebug {
     assert_that(p.cargo_process("build").arg("--release"),
                 execs().with_status(0));
     assert_that(process(p.bin("release/foo")).unwrap(), execs().with_stdout("fast\n"));
-})
+});
 
 test!(inferred_main_bin {
     let p = project("world")
@@ -1001,7 +1001,7 @@ test!(inferred_main_bin {
 
     assert_that(p.cargo_process("build"), execs().with_status(0));
     assert_that(process(p.bin("foo")).unwrap(), execs().with_status(0));
-})
+});
 
 test!(deletion_causes_failure {
     let p = project("foo")
@@ -1034,7 +1034,7 @@ test!(deletion_causes_failure {
             authors = []
         "#);
     assert_that(p.cargo_process("build"), execs().with_status(101));
-})
+});
 
 test!(bad_cargo_toml_in_target_dir {
     let p = project("world")
@@ -1051,7 +1051,7 @@ test!(bad_cargo_toml_in_target_dir {
 
     assert_that(p.cargo_process("build"), execs().with_status(0));
     assert_that(process(p.bin("foo")).unwrap(), execs().with_status(0));
-})
+});
 
 test!(lib_with_standard_name {
     let p = project("foo")
@@ -1076,7 +1076,7 @@ test!(lib_with_standard_name {
 ",
                        compiling = COMPILING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(simple_staticlib {
     let p = project("foo")
@@ -1093,7 +1093,7 @@ test!(simple_staticlib {
         .file("src/lib.rs", "pub fn foo() {}");
 
     assert_that(p.cargo_process("build"), execs().with_status(0));
-})
+});
 
 test!(staticlib_rlib_and_bin {
     let p = project("foo")
@@ -1116,7 +1116,7 @@ test!(staticlib_rlib_and_bin {
               }"#);
 
     assert_that(p.cargo_process("build"), execs().with_status(0));
-})
+});
 
 test!(opt_out_of_lib {
     let p = project("foo")
@@ -1131,7 +1131,7 @@ test!(opt_out_of_lib {
         .file("src/lib.rs", "bad syntax")
         .file("src/main.rs", "fn main() {}");
     assert_that(p.cargo_process("build"), execs().with_status(0));
-})
+});
 
 test!(opt_out_of_bin {
     let p = project("foo")
@@ -1146,7 +1146,7 @@ test!(opt_out_of_bin {
         .file("src/lib.rs", "")
         .file("src/main.rs", "bad syntax");
     assert_that(p.cargo_process("build"), execs().with_status(0));
-})
+});
 
 test!(single_lib {
     let p = project("foo")
@@ -1162,7 +1162,7 @@ test!(single_lib {
         "#)
         .file("src/bar.rs", "");
     assert_that(p.cargo_process("build"), execs().with_status(0));
-})
+});
 
 test!(deprecated_lib {
     let p = project("foo")
@@ -1180,7 +1180,7 @@ test!(deprecated_lib {
                 execs().with_status(0)
                        .with_stderr("\
 the [[lib]] section has been deprecated in favor of [lib]\n"));
-})
+});
 
 test!(freshness_ignores_excluded {
     let foo = project("foo")
@@ -1214,7 +1214,7 @@ test!(freshness_ignores_excluded {
     assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0)
                        .with_stdout(""));
-})
+});
 
 test!(rebuild_preserves_out_dir {
     let mut build = project("builder");
@@ -1265,7 +1265,7 @@ test!(rebuild_preserves_out_dir {
                        .with_stdout(format!("\
 {compiling} foo v0.0.0 ({url})
 ", compiling = COMPILING, url = foo.url())));
-})
+});
 
 test!(dep_no_libs {
     let foo = project("foo")
@@ -1290,7 +1290,7 @@ test!(dep_no_libs {
                 execs().with_status(101)
                        .with_stderr("\
 Package `bar v0.0.0 ([..])` has no library targets"));
-})
+});
 
 test!(recompile_space_in_name {
     let foo = project("foo")
@@ -1309,7 +1309,7 @@ test!(recompile_space_in_name {
     foo.root().move_into_the_past().assert();
     assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(ignore_bad_directories {
     let foo = project("foo")
@@ -1325,7 +1325,7 @@ test!(ignore_bad_directories {
     assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0));
     fs::chmod(&foo.root().join("tmp"), io::USER_DIR).unwrap();
-})
+});
 
 test!(bad_cargo_config {
     let foo = project("foo")
@@ -1351,7 +1351,7 @@ Caused by:
 [..].cargo[..]config:2:20-2:21 expected `=`, but found `i`
 
 "));
-})
+});
 
 #[cfg(target_os = "linux")]
 test!(cargo_platform_specific_dependency {
@@ -1392,7 +1392,7 @@ test!(cargo_platform_specific_dependency {
     assert_that(
       process(p.bin("foo")).unwrap(),
       execs().with_stdout("test passed\n"));
-})
+});
 
 #[cfg(not(target_os = "linux"))]
 test!(cargo_platform_specific_dependency {
@@ -1428,7 +1428,7 @@ test!(cargo_platform_specific_dependency {
 
     assert_that(p.cargo_process("build"),
         execs().with_status(101));
-})
+});
 
 test!(cargo_platform_specific_dependency_wrong_platform {
     let p = project("foo")
@@ -1469,7 +1469,7 @@ test!(cargo_platform_specific_dependency_wrong_platform {
     let lockfile = p.root().join("Cargo.lock");
     let lockfile = File::open(&lockfile).read_to_string().assert();
     assert!(lockfile.as_slice().contains("bar"))
-})
+});
 
 test!(example_bin_same_name {
     let p = project("foo")
@@ -1495,7 +1495,7 @@ test!(example_bin_same_name {
 
     assert_that(&p.bin("foo"), existing_file());
     assert_that(&p.bin("examples/foo"), existing_file());
-})
+});
 
 test!(compile_then_delete {
     let p = project("foo")
@@ -1518,4 +1518,4 @@ test!(compile_then_delete {
     fs::unlink(&p.bin("foo")).unwrap();
     assert_that(p.process(cargo_dir().join("cargo")).arg("run"),
                 execs().with_status(0));
-})
+});
index eb3d8eef376c58c89109ffb0afecbf34e09b7251..bcce93918b27c8c353fa895df9ffc5590fd89542 100644 (file)
@@ -38,7 +38,7 @@ url = p.url(), compiling = COMPILING, running = RUNNING))
 Failed to run custom build command for `foo v0.5.0 ({})`
 Process didn't exit successfully: `[..]build[..]build-script-build[..]` (status=101)",
 p.url())));
-})
+});
 
 test!(custom_build_env_vars {
     let p = project("foo")
@@ -111,7 +111,7 @@ test!(custom_build_env_vars {
 
     assert_that(p.cargo_process("build").arg("--features").arg("bar_feat"),
                 execs().with_status(0));
-})
+});
 
 test!(custom_build_script_wrong_rustc_flags {
     let p = project("foo")
@@ -138,7 +138,7 @@ test!(custom_build_script_wrong_rustc_flags {
 Only `-l` and `-L` flags are allowed in build script of `foo v0.5.0 ({})`: \
 `-aaa -bbb`",
 p.url())));
-})
+});
 
 /*
 test!(custom_build_script_rustc_flags {
@@ -189,7 +189,7 @@ running = RUNNING, compiling = COMPILING, sep = path::SEP,
 dir = p.root().display(),
 url = p.url(),
 )));
-})
+});
 */
 
 test!(links_no_build_cmd {
@@ -209,7 +209,7 @@ test!(links_no_build_cmd {
 package `foo v0.5.0 (file://[..])` specifies that it links to `a` but does \
 not have a custom build script
 "));
-})
+});
 
 test!(links_duplicates {
     let p = project("foo")
@@ -246,7 +246,7 @@ linked to by one package
   [..] v0.5.0 (file://[..])
   [..] v0.5.0 (file://[..])
 "));
-})
+});
 
 test!(overrides_and_links {
     let (_, target) = ::cargo::ops::rustc_version().unwrap();
@@ -297,7 +297,7 @@ test!(overrides_and_links {
 [..]
 {running} `rustc [..] --crate-name foo [..] -L foo -L bar[..]`
 ", running = RUNNING).as_slice()));
-})
+});
 
 test!(unused_overrides {
     let (_, target) = ::cargo::ops::rustc_version().unwrap();
@@ -321,7 +321,7 @@ test!(unused_overrides {
 
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(0));
-})
+});
 
 test!(links_passes_env_vars {
     let p = project("foo")
@@ -371,7 +371,7 @@ test!(links_passes_env_vars {
 {running} `[..]`
 {running} `rustc [..] --crate-name foo [..]`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(only_rerun_build_script {
     let p = project("foo")
@@ -401,7 +401,7 @@ test!(only_rerun_build_script {
 {running} `[..]build-script-build[..]`
 {running} `rustc [..] --crate-name foo [..]`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(rebuild_continues_to_pass_env_vars {
     let a = project("a")
@@ -452,7 +452,7 @@ test!(rebuild_continues_to_pass_env_vars {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("build").arg("-v"),
                 execs().with_status(0));
-})
+});
 
 test!(testing_and_such {
     let p = project("foo")
@@ -512,7 +512,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 {compiling} foo v0.5.0 (file://[..])
 {running} `target[..]foo`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(propagation_of_l_flags {
     let (_, target) = ::cargo::ops::rustc_version().unwrap();
@@ -570,7 +570,7 @@ test!(propagation_of_l_flags {
 {compiling} foo v0.5.0 (file://[..])
 {running} `rustc [..] --crate-name foo [..] -L bar -L foo`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(build_deps_simple {
     let p = project("foo")
@@ -606,7 +606,7 @@ test!(build_deps_simple {
 {running} `[..]foo-[..]build-script-build[..]`
 {running} `rustc [..] --crate-name foo [..]`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(build_deps_not_for_normal {
     let (_, target) = ::cargo::ops::rustc_version().unwrap();
@@ -645,7 +645,7 @@ Could not compile `foo`.
 Caused by:
   Process didn't exit successfully: [..]
 "));
-})
+});
 
 test!(build_cmd_with_a_build_cmd {
     let p = project("foo")
@@ -708,7 +708,7 @@ test!(build_cmd_with_a_build_cmd {
     --out-dir [..]target --dep-info [..]fingerprint[..]dep-lib-foo \
     -L [..]target -L [..]target[..]deps`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 test!(out_dir_is_preserved {
     let p = project("foo")
@@ -755,7 +755,7 @@ test!(out_dir_is_preserved {
     File::create(&p.root().join("foo")).unwrap();
     assert_that(p.process(cargo_dir().join("cargo")).arg("build").arg("-v"),
                 execs().with_status(0));
-})
+});
 
 test!(output_separate_lines {
     let p = project("foo")
@@ -781,7 +781,7 @@ test!(output_separate_lines {
 {running} `[..]foo-[..]build-script-build[..]`
 {running} `rustc [..] --crate-name foo [..] -L foo -l foo:static`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
-})
+});
 
 #[cfg(not(windows))] // FIXME(#867)
 test!(code_generation {
@@ -794,7 +794,7 @@ test!(code_generation {
             build = "build.rs"
         "#)
         .file("src/main.rs", r#"
-            include!(concat!(env!("OUT_DIR"), "/hello.rs"))
+            include!(concat!(env!("OUT_DIR"), "/hello.rs"));
 
             fn main() {
                 println!("{}", message());
@@ -824,7 +824,7 @@ Hello, World!
 
     assert_that(p.cargo_process("test"),
                 execs().with_status(0));
-})
+});
 
 test!(release_with_build_script {
     let p = project("foo")
@@ -842,7 +842,7 @@ test!(release_with_build_script {
 
     assert_that(p.cargo_process("build").arg("-v").arg("--release"),
                 execs().with_status(0));
-})
+});
 
 test!(build_script_only {
     let p = project("foo")
@@ -858,7 +858,7 @@ test!(build_script_only {
                 execs().with_status(101)
                        .with_stderr("either a [lib] or [[bin]] section must \
                                      be present"));
-})
+});
 
 test!(shared_dep_with_a_build_script {
     let p = project("foo")
@@ -898,7 +898,7 @@ test!(shared_dep_with_a_build_script {
         .file("b/src/lib.rs", "");
     assert_that(p.cargo_process("build"),
                 execs().with_status(0));
-})
+});
 
 test!(transitive_dep_host {
     let p = project("foo")
@@ -940,7 +940,7 @@ test!(transitive_dep_host {
         .file("b/src/lib.rs", "");
     assert_that(p.cargo_process("build"),
                 execs().with_status(0));
-})
+});
 
 test!(test_a_lib_with_a_build_command {
     let p = project("foo")
@@ -952,7 +952,7 @@ test!(test_a_lib_with_a_build_command {
             build = "build.rs"
         "#)
         .file("src/lib.rs", r#"
-            include!(concat!(env!("OUT_DIR"), "/foo.rs"))
+            include!(concat!(env!("OUT_DIR"), "/foo.rs"));
 
             /// ```
             /// foo::bar();
@@ -974,7 +974,7 @@ test!(test_a_lib_with_a_build_command {
         "#);
     assert_that(p.cargo_process("test"),
                 execs().with_status(0));
-})
+});
 
 test!(test_dev_dep_build_script {
     let p = project("foo")
@@ -999,4 +999,4 @@ test!(test_dev_dep_build_script {
         .file("a/src/lib.rs", "");
 
     assert_that(p.cargo_process("test"), execs().with_status(0));
-})
+});
index af754adba0d07b45aa15b1dcab2437682fe9bc4b..51cd2bceacf37a625cbca7c6530f9de41c6c6192 100644 (file)
@@ -132,7 +132,7 @@ test!(cargo_compile_simple_git_dep {
     assert_that(
       cargo::util::process(project.bin("foo")).unwrap(),
       execs().with_stdout("hello world\n"));
-})
+});
 
 test!(cargo_compile_git_dep_branch {
     let project = project("foo");
@@ -199,7 +199,7 @@ test!(cargo_compile_git_dep_branch {
     assert_that(
       cargo::util::process(project.bin("foo")).unwrap(),
       execs().with_stdout("hello world\n"));
-})
+});
 
 test!(cargo_compile_git_dep_tag {
     let project = project("foo");
@@ -269,7 +269,7 @@ test!(cargo_compile_git_dep_tag {
     assert_that(
       cargo::util::process(project.bin("foo")).unwrap(),
       execs().with_stdout("hello world\n"));
-})
+});
 
 test!(cargo_compile_with_nested_paths {
     let git_project = git_repo("dep1", |project| {
@@ -344,7 +344,7 @@ test!(cargo_compile_with_nested_paths {
     assert_that(
       cargo::util::process(p.bin("parent")).unwrap(),
       execs().with_stdout("hello world\n"));
-})
+});
 
 test!(cargo_compile_with_meta_package {
     let git_project = git_repo("meta-dep", |project| {
@@ -417,7 +417,7 @@ test!(cargo_compile_with_meta_package {
     assert_that(
       cargo::util::process(p.bin("parent")).unwrap(),
       execs().with_stdout("this is dep1 this is dep2\n"));
-})
+});
 
 test!(cargo_compile_with_short_ssh_git {
     let url = "git@github.com:a/dep";
@@ -445,7 +445,7 @@ test!(cargo_compile_with_short_ssh_git {
         .with_stdout("")
         .with_stderr(format!("Cargo.toml is not a valid manifest\n\n\
                               invalid url `{}`: relative URL without a base\n", url)));
-})
+});
 
 test!(two_revs_same_deps {
     let bar = git_repo("meta-dep", |project| {
@@ -514,7 +514,7 @@ test!(two_revs_same_deps {
                 execs().with_status(0));
     assert_that(&foo.bin("foo"), existing_file());
     assert_that(foo.process(foo.bin("foo")), execs().with_status(0));
-})
+});
 
 test!(recompilation {
     let git_project = git_repo("bar", |project| {
@@ -613,7 +613,7 @@ test!(recompilation {
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_stdout(format!("{} foo v0.5.0 ({})\n",
                                             COMPILING, p.url())));
-})
+});
 
 test!(update_with_shared_deps {
     let git_project = git_repo("bar", |project| {
@@ -731,7 +731,7 @@ test!(update_with_shared_deps {
                 execs().with_stdout(format!("{} git repository `{}`",
                                             UPDATING,
                                             git_project.url())));
-})
+});
 
 test!(dep_with_submodule {
     let project = project("foo");
@@ -773,7 +773,7 @@ test!(dep_with_submodule {
 
     assert_that(project.cargo_process("build"),
         execs().with_stderr("").with_status(0));
-})
+});
 
 test!(two_deps_only_update_one {
     let project = project("foo");
@@ -840,7 +840,7 @@ test!(two_deps_only_update_one {
         .with_stdout(format!("{} git repository `{}`\n",
                              UPDATING, git1.url()))
         .with_stderr(""));
-})
+});
 
 test!(stale_cached_version {
     let bar = git_repo("meta-dep", |project| {
@@ -910,7 +910,7 @@ test!(stale_cached_version {
 {compiling} foo v0.0.0 ({foo})
 ", updating = UPDATING, compiling = COMPILING, bar = bar.url(), foo = foo.url())));
     assert_that(foo.process(foo.bin("foo")), execs().with_status(0));
-})
+});
 
 test!(dep_with_changed_submodule {
     let project = project("foo");
@@ -1009,7 +1009,7 @@ test!(dep_with_changed_submodule {
                                       compiling = COMPILING, running = RUNNING))
                 .with_stderr("")
                 .with_status(0));
-})
+});
 
 test!(dev_deps_with_testing {
     let p2 = git_repo("bar", |project| {
@@ -1068,7 +1068,7 @@ test tests::foo ... ok
 test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
 ", compiling = COMPILING, running = RUNNING)));
-})
+});
 
 test!(git_build_cmd_freshness {
     let foo = git_repo("foo", |project| {
@@ -1106,7 +1106,7 @@ test!(git_build_cmd_freshness {
     assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0)
                        .with_stdout(""));
-})
+});
 
 test!(git_name_not_always_needed {
     let p2 = git_repo("bar", |project| {
@@ -1145,7 +1145,7 @@ test!(git_name_not_always_needed {
 {updating} git repository `{bar}`
 {compiling} foo v0.5.0 ({url})
 ", updating = UPDATING, compiling = COMPILING, url = p.url(), bar = p2.url())));
-})
+});
 
 test!(git_repo_changing_no_rebuild {
     let bar = git_repo("bar", |project| {
@@ -1209,7 +1209,7 @@ test!(git_repo_changing_no_rebuild {
     // even though the git repo has changed.
     assert_that(p1.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_stdout(""));
-})
+});
 
 test!(git_dep_build_cmd {
     let p = git_repo("foo", |project| {
@@ -1268,7 +1268,7 @@ test!(git_dep_build_cmd {
     assert_that(
       cargo::util::process(p.bin("foo")).unwrap(),
       execs().with_stdout("1\n"));
-})
+});
 
 test!(fetch_downloads {
     let bar = git_repo("bar", |project| {
@@ -1298,7 +1298,7 @@ test!(fetch_downloads {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("fetch"),
                 execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(warnings_in_git_dep {
     let bar = git_repo("bar", |project| {
@@ -1331,7 +1331,7 @@ test!(warnings_in_git_dep {
                              COMPILING, bar.url(),
                              COMPILING, p.url()))
         .with_stderr(""));
-})
+});
 
 test!(update_ambiguous {
     let foo1 = git_repo("foo1", |project| {
@@ -1390,7 +1390,7 @@ following:
   foo:0.[..].0
   foo:0.[..].0
 "));
-})
+});
 
 test!(update_one_dep_in_repo_with_many_deps {
     let foo = git_repo("foo", |project| {
@@ -1430,7 +1430,7 @@ test!(update_one_dep_in_repo_with_many_deps {
                        .with_stdout(format!("\
 Updating git repository `{}`
 ", foo.url())));
-})
+});
 
 test!(switch_deps_does_not_update_transitive {
     let transitive = git_repo("transitive", |project| {
@@ -1507,7 +1507,7 @@ Updating git repository `{}`
 {compiling} dep [..]
 {compiling} project [..]
 ", dep2.url(), compiling = COMPILING)));
-})
+});
 
 test!(update_one_source_updates_all_packages_in_that_git_source {
     let dep = git_repo("dep", |project| {
@@ -1562,7 +1562,7 @@ test!(update_one_source_updates_all_packages_in_that_git_source {
                                                            .unwrap();
     assert!(!lockfile.as_slice().contains(rev1.to_string().as_slice()),
             "{} in {}", rev1, lockfile);
-})
+});
 
 test!(switch_sources {
     let a1 = git_repo("a1", |project| {
@@ -1631,4 +1631,4 @@ test!(switch_sources {
 {compiling} b v0.5.0 ([..])
 {compiling} project v0.5.0 ([..])
 ", updating = UPDATING, compiling = COMPILING).as_slice()));
-})
+});
index f58fc27db598853786662303fdd6a9784b22d21c..725a7ad0ce924d7ce213438e77cebfa22e19ee6f 100644 (file)
@@ -47,7 +47,7 @@ test!(old_custom_build {
                        .with_stderr("warning: [..] deprecated.\n\
                                               [..]\n\
                                               [..]"));
-})
+});
 
 test!(old_custom_multiple_build {
     let mut build1 = project("builder1");
@@ -110,7 +110,7 @@ test!(old_custom_multiple_build {
                 execs().with_status(0)
                        .with_stdout(format!("   Compiling foo v0.5.0 ({})\n",
                                             p.url())));
-})
+});
 
 test!(old_custom_build_failure {
     let mut build = project("builder");
@@ -159,7 +159,7 @@ task '<main>' panicked at 'nope', {filename}:2\n\
 \n\
 ", build.bin("foo").display(), filename = format!("src{}foo.rs", path::SEP),
    dir = p.url())));
-})
+});
 
 test!(old_custom_second_build_failure {
     let mut build1 = project("builder1");
@@ -225,7 +225,7 @@ task '<main>' panicked at 'nope', {filename}:2\n\
 \n\
 ", build2.bin("bar").display(), filename = format!("src{}bar.rs", path::SEP),
    dir = p.url())));
-})
+});
 
 test!(old_custom_build_env_vars {
     let bar = project("bar")
@@ -312,7 +312,7 @@ test!(old_custom_build_env_vars {
         "#);
     assert_that(p.cargo_process("build").arg("--features").arg("foo"),
                 execs().with_status(0));
-})
+});
 
 test!(old_custom_build_in_dependency {
     let mut p = project("foo");
@@ -369,7 +369,7 @@ test!(old_custom_build_in_dependency {
         "#);
     assert_that(p.cargo_process("build"),
                 execs().with_status(0));
-})
+});
 
 // tests that custom build in dep can be built twice in a row - issue 227
 test!(old_custom_build_in_dependency_twice {
@@ -405,4 +405,4 @@ test!(old_custom_build_in_dependency_twice {
                 execs().with_status(0));
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0));
-})
+});
index 40175eb2f58ce039a0087fc5362ee506b139fd1d..480499257fd218d87b3a552063db1f50ec1b3437 100644 (file)
@@ -99,7 +99,7 @@ test!(cargo_compile_with_nested_deps_shorthand {
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
-})
+});
 
 test!(cargo_compile_with_root_dev_deps {
     let p = project("foo")
@@ -137,7 +137,7 @@ test!(cargo_compile_with_root_dev_deps {
     p2.build();
     assert_that(p.cargo_process("build"),
                 execs().with_status(101))
-})
+});
 
 test!(cargo_compile_with_root_dev_deps_with_testing {
     let p = project("foo")
@@ -184,7 +184,7 @@ running 0 tests
 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ", compiling = COMPILING, url = p.url(), running = RUNNING)));
-})
+});
 
 test!(cargo_compile_with_transitive_dev_deps {
     let p = project("foo")
@@ -238,7 +238,7 @@ test!(cargo_compile_with_transitive_dev_deps {
     assert_that(
       cargo::util::process(p.bin("foo")).unwrap(),
       execs().with_stdout("zoidberg\n"));
-})
+});
 
 test!(no_rebuild_dependency {
     let mut p = project("foo");
@@ -286,7 +286,7 @@ test!(no_rebuild_dependency {
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
-})
+});
 
 test!(deep_dependencies_trigger_rebuild {
     let mut p = project("foo");
@@ -374,7 +374,7 @@ test!(deep_dependencies_trigger_rebuild {
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
 
-})
+});
 
 test!(no_rebuild_two_deps {
     let mut p = project("foo");
@@ -436,7 +436,7 @@ test!(no_rebuild_two_deps {
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_stdout(""));
     assert_that(&p.bin("foo"), existing_file());
-})
+});
 
 test!(nested_deps_recompile {
     let p = project("foo")
@@ -487,7 +487,7 @@ test!(nested_deps_recompile {
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_stdout(format!("{} foo v0.5.0 ({})\n",
                                             COMPILING, p.url())));
-})
+});
 
 test!(error_message_for_missing_manifest {
     let p = project("foo")
@@ -514,7 +514,7 @@ test!(error_message_for_missing_manifest {
                 .with_stderr(format!("Could not find `Cargo.toml` in `{}`\n",
                                      p.root().join_many(&["src", "bar"]).display())));
 
-})
+});
 
 test!(override_relative {
     let bar = project("bar")
@@ -547,7 +547,7 @@ test!(override_relative {
     bar.build();
     assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0));
 
-})
+});
 
 test!(override_self {
     let bar = project("bar")
@@ -583,7 +583,7 @@ test!(override_self {
     bar.build();
     assert_that(p.cargo_process("build"), execs().with_status(0));
 
-})
+});
 
 test!(override_path_dep {
     let bar = project("bar")
@@ -627,7 +627,7 @@ test!(override_path_dep {
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(0));
 
-})
+});
 
 test!(path_dep_build_cmd {
     let p = project("foo")
@@ -695,7 +695,7 @@ test!(path_dep_build_cmd {
     assert_that(
       cargo::util::process(p.bin("foo")).unwrap(),
       execs().with_stdout("1\n"));
-})
+});
 
 test!(dev_deps_no_rebuild_lib {
     let p = project("foo")
@@ -743,4 +743,4 @@ running 0 tests
 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ", COMPILING, p.url(), COMPILING, p.url())));
-})
+});
index 2d6a7bd9f9e221e3901f90d5d4ad255cc16e2a58..9df838c7ac0a62c4a5e1bdc1446eaaaa51902987 100644 (file)
@@ -80,7 +80,7 @@ test!(plugin_to_the_max {
                 execs().with_status(0));
     assert_that(foo.process(cargo_dir().join("cargo")).arg("doc"),
                 execs().with_status(0));
-})
+});
 
 test!(plugin_with_dynamic_native_dependency {
     let build = project("builder")
@@ -166,4 +166,4 @@ test!(plugin_with_dynamic_native_dependency {
 
     assert_that(foo.cargo_process("build").env("SRC", Some(lib.as_vec())),
                 execs().with_status(0));
-})
+});
index 2c7e980d5659e83b043a8d69ef1e7bb16e1491ef..ec8d9d69d4472aadd1236dfd41d9e2ee87b1c5a8 100644 (file)
@@ -71,7 +71,7 @@ test!(simple_cross {
     assert_that(
       process(p.target_bin(target, "foo")).unwrap(),
       execs().with_status(0));
-})
+});
 
 test!(simple_deps {
     if disabled() { return }
@@ -108,7 +108,7 @@ test!(simple_deps {
     assert_that(
       process(p.target_bin(target, "foo")).unwrap(),
       execs().with_status(0));
-})
+});
 
 test!(plugin_deps {
     if disabled() { return }
@@ -186,7 +186,7 @@ test!(plugin_deps {
     assert_that(
       process(foo.target_bin(target, "foo")).unwrap(),
       execs().with_status(0));
-})
+});
 
 test!(plugin_to_the_max {
     if disabled() { return }
@@ -271,7 +271,7 @@ test!(plugin_to_the_max {
     assert_that(
       process(foo.target_bin(target, "foo")).unwrap(),
       execs().with_status(0));
-})
+});
 
 test!(linker_and_ar {
     if disabled() { return }
@@ -311,7 +311,7 @@ test!(linker_and_ar {
                             target = target,
                             sep = path::SEP,
                             ).as_slice()));
-})
+});
 
 test!(plugin_with_extra_dylib_dep {
     if disabled() { return }
@@ -377,7 +377,7 @@ test!(plugin_with_extra_dylib_dep {
     let target = alternate();
     assert_that(foo.cargo_process("build").arg("--target").arg(target),
                 execs().with_status(0));
-})
+});
 
 test!(cross_tests {
     if disabled() { return }
@@ -433,7 +433,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ", compiling = COMPILING, running = RUNNING, foo = p.url(), triple = target,
    doctest = DOCTEST)));
-})
+});
 
 test!(simple_cargo_run {
     if disabled() { return }
@@ -455,7 +455,7 @@ test!(simple_cargo_run {
     let target = alternate();
     assert_that(p.cargo_process("run").arg("--target").arg(target),
                 execs().with_status(0));
-})
+});
 
 test!(cross_but_no_dylibs {
     let p = project("foo")
@@ -474,7 +474,7 @@ test!(cross_but_no_dylibs {
                 execs().with_status(101)
                        .with_stderr("dylib outputs are not supported for \
                                      arm-apple-ios"));
-})
+});
 
 test!(cross_with_a_build_script {
     if disabled() { return }
@@ -515,7 +515,7 @@ test!(cross_with_a_build_script {
 {running} `rustc {dir}{sep}src{sep}main.rs [..] --target {target} [..]`
 ", compiling = COMPILING, running = RUNNING, target = target,
    dir = p.root().display(), sep = path::SEP).as_slice()));
-})
+});
 
 test!(build_script_needed_for_host_and_target {
     if disabled() { return }
@@ -597,7 +597,7 @@ test!(build_script_needed_for_host_and_target {
            -L /path/to/{target}`
 ", compiling = COMPILING, running = RUNNING, target = target, host = host,
    dir = p.root().display(), sep = path::SEP).as_slice()));
-})
+});
 
 test!(build_deps_for_the_right_arch {
     if disabled() { return }
@@ -638,7 +638,7 @@ test!(build_deps_for_the_right_arch {
     let target = alternate();
     assert_that(p.cargo_process("build").arg("--target").arg(&target).arg("-v"),
                 execs().with_status(0));
-})
+});
 
 test!(build_script_only_host {
     if disabled() { return }
@@ -679,4 +679,4 @@ test!(build_script_only_host {
     let target = alternate();
     assert_that(p.cargo_process("build").arg("--target").arg(&target).arg("-v"),
                 execs().with_status(0));
-})
+});
index 60525f58699f78ed9c393e070bfda0301eb74ce4..2e963802b6318dacabee0857adf7fa731b6557a1 100644 (file)
@@ -26,7 +26,7 @@ test!(simple {
         dir = path2url(p.root())).as_slice()));
     assert_that(&p.root().join("target/doc"), existing_dir());
     assert_that(&p.root().join("target/doc/foo/index.html"), existing_file());
-})
+});
 
 test!(doc_no_libs {
     let p = project("foo")
@@ -46,7 +46,7 @@ test!(doc_no_libs {
 
     assert_that(p.cargo_process("doc"),
                 execs().with_status(0));
-})
+});
 
 test!(doc_twice {
     let p = project("foo")
@@ -69,7 +69,7 @@ test!(doc_twice {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("doc"),
                 execs().with_status(0).with_stdout(""))
-})
+});
 
 test!(doc_deps {
     let p = project("foo")
@@ -115,7 +115,7 @@ test!(doc_deps {
     assert_that(&p.root().join("target/doc"), existing_dir());
     assert_that(&p.root().join("target/doc/foo/index.html"), existing_file());
     assert_that(&p.root().join("target/doc/bar/index.html"), existing_file());
-})
+});
 
 test!(doc_no_deps {
     let p = project("foo")
@@ -153,7 +153,7 @@ test!(doc_no_deps {
     assert_that(&p.root().join("target/doc"), existing_dir());
     assert_that(&p.root().join("target/doc/foo/index.html"), existing_file());
     assert_that(&p.root().join("target/doc/bar/index.html"), is_not(existing_file()));
-})
+});
 
 test!(doc_only_bin {
     let p = project("foo")
@@ -186,7 +186,7 @@ test!(doc_only_bin {
     assert_that(&p.root().join("target/doc"), existing_dir());
     assert_that(&p.root().join("target/doc/bar/index.html"), existing_file());
     assert_that(&p.root().join("target/doc/foo/index.html"), existing_file());
-})
+});
 
 test!(doc_lib_bin_same_name {
     let p = project("foo")
@@ -205,7 +205,7 @@ test!(doc_lib_bin_same_name {
 Cannot document a package where a library and a binary have the same name. \
 Consider renaming one or marking the target as `doc = false`
 "));
-})
+});
 
 test!(doc_dash_p {
     let p = project("foo")
@@ -243,4 +243,4 @@ test!(doc_dash_p {
 {compiling} b v0.0.1 (file://[..])
 {compiling} a v0.0.1 (file://[..])
 ", compiling = COMPILING).as_slice()));
-})
+});
index b5353f750ae323f044d9a804743869b5f5819032..65b3bc9fdf398fe7ef37f6a0c52603359afe4e34 100644 (file)
@@ -27,7 +27,7 @@ Cargo.toml is not a valid manifest
 
 Feature `bar` includes `baz` which is neither a dependency nor another feature
 ").as_slice()));
-})
+});
 
 test!(invalid2 {
     let p = project("foo")
@@ -51,7 +51,7 @@ Cargo.toml is not a valid manifest
 
 Features and dependencies cannot have the same name: `bar`
 ").as_slice()));
-})
+});
 
 test!(invalid3 {
     let p = project("foo")
@@ -76,7 +76,7 @@ Cargo.toml is not a valid manifest
 Feature `bar` depends on `baz` which is not an optional dependency.
 Consider adding `optional = true` to the dependency
 ").as_slice()));
-})
+});
 
 test!(invalid4 {
     let p = project("foo")
@@ -115,7 +115,7 @@ Package `bar v0.0.1 ([..])` does not have these features: `bar`
                 execs().with_status(101).with_stderr(format!("\
 Package `foo v0.0.1 ([..])` does not have these features: `test`
 ").as_slice()));
-})
+});
 
 test!(invalid5 {
     let p = project("foo")
@@ -137,7 +137,7 @@ Cargo.toml is not a valid manifest
 
 Dev-dependencies are not allowed to be optional: `bar`
 ").as_slice()));
-})
+});
 
 test!(invalid6 {
     let p = project("foo")
@@ -158,7 +158,7 @@ Cargo.toml is not a valid manifest
 
 Feature `foo` requires `bar` which is not an optional dependency
 ").as_slice()));
-})
+});
 
 test!(invalid7 {
     let p = project("foo")
@@ -180,7 +180,7 @@ Cargo.toml is not a valid manifest
 
 Feature `foo` requires `bar` which is not an optional dependency
 ").as_slice()));
-})
+});
 
 test!(invalid8 {
     let p = project("foo")
@@ -207,7 +207,7 @@ test!(invalid8 {
                 execs().with_status(101).with_stderr(format!("\
 features in dependencies cannot enable features in other dependencies: `foo/bar`
 ").as_slice()));
-})
+});
 
 test!(no_feature_doesnt_build {
     let p = project("foo")
@@ -251,7 +251,7 @@ test!(no_feature_doesnt_build {
 ", compiling = COMPILING, dir = p.url()).as_slice()));
     assert_that(p.process(p.bin("foo")),
                 execs().with_status(0).with_stdout("bar\n"));
-})
+});
 
 test!(default_feature_pulled_in {
     let p = project("foo")
@@ -298,7 +298,7 @@ test!(default_feature_pulled_in {
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url()).as_slice()));
     assert_that(p.process(p.bin("foo")), execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(cyclic_feature {
     let p = project("foo")
@@ -317,7 +317,7 @@ test!(cyclic_feature {
                 execs().with_status(101).with_stderr("\
 Cyclic feature dependency: feature `default` depends on itself
 "));
-})
+});
 
 test!(cyclic_feature2 {
     let p = project("foo")
@@ -337,7 +337,7 @@ test!(cyclic_feature2 {
                 execs().with_status(101).with_stderr("\
 Cyclic feature dependency: feature `[..]` depends on itself
 "));
-})
+});
 
 test!(groups_on_groups_on_groups {
     let p = project("foo")
@@ -391,7 +391,7 @@ test!(groups_on_groups_on_groups {
 {compiling} ba[..] v0.0.1 ({dir})
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url()).as_slice()));
-})
+});
 
 test!(many_cli_features {
     let p = project("foo")
@@ -435,7 +435,7 @@ test!(many_cli_features {
 {compiling} ba[..] v0.0.1 ({dir})
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url()).as_slice()));
-})
+});
 
 test!(union_features {
     let p = project("foo")
@@ -496,7 +496,7 @@ test!(union_features {
 {compiling} d1 v0.0.1 ({dir})
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url()).as_slice()));
-})
+});
 
 test!(many_features_no_rebuilds {
     let p = project("foo")
@@ -536,7 +536,7 @@ test!(many_features_no_rebuilds {
 {fresh} a v0.1.0 ([..])
 {fresh} b v0.1.0 ([..])
 ", fresh = FRESH).as_slice()));
-})
+});
 
 // Tests that all cmd lines work with `--features ""`
 test!(empty_features {
@@ -551,7 +551,7 @@ test!(empty_features {
 
     assert_that(p.cargo_process("build").arg("--features").arg(""),
                 execs().with_status(0));
-})
+});
 
 // Tests that all cmd lines work with `--features ""`
 test!(transitive_features {
@@ -588,7 +588,7 @@ test!(transitive_features {
 
     assert_that(p.cargo_process("build").arg("--features").arg("foo"),
                 execs().with_status(0));
-})
+});
 
 test!(everything_in_the_lockfile {
     let p = project("foo")
@@ -646,4 +646,4 @@ test!(everything_in_the_lockfile {
     assert!(lockfile.contains(r#"name = "d1""#), "d1 not found\n{}", lockfile);
     assert!(lockfile.contains(r#"name = "d2""#), "d2 not found\n{}", lockfile);
     assert!(lockfile.contains(r#"name = "d3""#), "d3 not found\n{}", lockfile);
-})
+});
index 7ebd1cde52c645ebc3289d92ab9da537fbb317f4..b0bf231df30b7467389253a8b53fde4218d29291 100644 (file)
@@ -18,4 +18,4 @@ test!(no_deps {
 
     assert_that(p.cargo_process("fetch"),
                 execs().with_status(0).with_stdout(""));
-})
+});
index 4f78183a93f4bc352595713c48de2de32acc7c9e..8f2d055101b2d30cf4aed7f34cb31c479fd29db2 100644 (file)
@@ -38,7 +38,7 @@ test!(modifying_and_moving {
     fs::rename(&p.root().join("src/a.rs"), &p.root().join("src/b.rs")).assert();
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(101));
-})
+});
 
 test!(modify_only_some_files {
     let p = project("foo")
@@ -82,4 +82,4 @@ test!(modify_only_some_files {
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = path2url(p.root()))));
     assert_that(&p.bin("foo"), existing_file());
-})
+});
index 9dd5c19bdd6824d7751896f3289fa152e955b068..b0e58e44ed56a5a0eda3587e02c53485b92124c6 100644 (file)
@@ -28,7 +28,7 @@ test!(ignores_carriage_return {
     File::create(&lockfile).write_str(lock.as_slice()).assert();
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0));
-})
+});
 
 test!(adding_and_removing_packages {
     let p = project("foo")
@@ -93,7 +93,7 @@ test!(adding_and_removing_packages {
                 execs().with_status(0));
     let lock4 = File::open(&lockfile).read_to_string().assert();
     assert_eq!(lock1, lock4);
-})
+});
 
 test!(preserve_metadata {
     let p = project("foo")
@@ -137,4 +137,4 @@ foo = "bar"
                 execs().with_status(0));
     let lock = File::open(&lockfile).read_to_string().assert();
     assert!(lock.as_slice().contains(metadata.trim()), "{}", lock);
-})
+});
index d480caab057705b62987f4f97331b12cc3852169..0440766579a28af5e7ba0ed116797378604e63d5 100644 (file)
@@ -34,7 +34,7 @@ test!(simple_lib {
 
     assert_that(cargo_process("build").cwd(paths::root().join("foo")),
                 execs().with_status(0));
-})
+});
 
 test!(simple_bin {
     os::setenv("USER", "foo");
@@ -50,7 +50,7 @@ test!(simple_bin {
     assert_that(&paths::root().join(format!("foo/target/foo{}",
                                             os::consts::EXE_SUFFIX)),
                 existing_file());
-})
+});
 
 test!(simple_git {
     let td = TempDir::new("cargo").unwrap();
@@ -66,7 +66,7 @@ test!(simple_git {
 
     assert_that(cargo_process("build").cwd(td.path().clone().join("foo")),
                 execs().with_status(0));
-})
+});
 
 test!(simple_travis {
     os::setenv("USER", "foo");
@@ -80,7 +80,7 @@ test!(simple_travis {
 
     assert_that(cargo_process("build").cwd(paths::root().join("foo")),
                 execs().with_status(0));
-})
+});
 
 test!(no_argument {
     assert_that(cargo_process("new"),
@@ -90,7 +90,7 @@ Usage:
     cargo new [options] <path>
     cargo new -h | --help
 "));
-})
+});
 
 test!(existing {
     let dst = paths::root().join("foo");
@@ -99,13 +99,13 @@ test!(existing {
                 execs().with_status(101)
                        .with_stderr(format!("Destination `{}` already exists\n",
                                             dst.display())));
-})
+});
 
 test!(invalid_characters {
     assert_that(cargo_process("new").arg("foo.rs"),
                 execs().with_status(101)
                        .with_stderr("Invalid character `.` in crate name: `foo.rs`"));
-})
+});
 
 test!(finds_author_user {
     // Use a temp dir to make sure we don't pick up .cargo/config somewhere in
@@ -118,7 +118,7 @@ test!(finds_author_user {
     let toml = td.path().join("foo/Cargo.toml");
     let toml = File::open(&toml).read_to_string().assert();
     assert!(toml.as_slice().contains(r#"authors = ["foo"]"#));
-})
+});
 
 test!(finds_author_username {
     // Use a temp dir to make sure we don't pick up .cargo/config somewhere in
@@ -133,7 +133,7 @@ test!(finds_author_username {
     let toml = td.path().join("foo/Cargo.toml");
     let toml = File::open(&toml).read_to_string().assert();
     assert!(toml.as_slice().contains(r#"authors = ["foo"]"#));
-})
+});
 
 test!(finds_author_git {
     my_process("git").args(&["config", "--global", "user.name", "bar"])
@@ -146,7 +146,7 @@ test!(finds_author_git {
     let toml = paths::root().join("foo/Cargo.toml");
     let toml = File::open(&toml).read_to_string().assert();
     assert!(toml.as_slice().contains(r#"authors = ["bar <baz>"]"#));
-})
+});
 
 test!(author_prefers_cargo {
     my_process("git").args(&["config", "--global", "user.name", "bar"])
@@ -169,7 +169,7 @@ test!(author_prefers_cargo {
     let toml = File::open(&toml).read_to_string().assert();
     assert!(toml.as_slice().contains(r#"authors = ["new-foo <new-bar>"]"#));
     assert!(!root.join("foo/.gitignore").exists());
-})
+});
 
 test!(git_prefers_command_line {
     let root = paths::root();
@@ -186,7 +186,7 @@ test!(git_prefers_command_line {
                                     .env("USER", Some("foo")),
                 execs().with_status(0));
     assert!(td.path().join("foo/.gitignore").exists());
-})
+});
 
 test!(subpackage_no_git {
     os::setenv("USER", "foo");
@@ -201,4 +201,4 @@ test!(subpackage_no_git {
                  is_not(existing_file()));
     assert_that(&paths::root().join("foo/components/subcomponent/.gitignore"),
                  is_not(existing_file()));
-})
+});
index 87c1b3efae49515ad979351678df7f7f697140c5..1de06e6d297ac3e8986ea05726dae2606e12340e 100644 (file)
@@ -57,7 +57,7 @@ src[..]main.rs
                 fname == b"foo-0.0.1/src/main.rs",
                 "unexpected filename: {}", f.filename())
     }
-})
+});
 
 test!(metadata_warning {
     let p = project("all")
@@ -133,7 +133,7 @@ http://doc.crates.io/manifest.html#package-metadata for more info."));
         verifying = VERIFYING,
         compiling = COMPILING,
         dir = p.url()).as_slice()));
-})
+});
 
 test!(package_verbose {
     let root = paths::root().join("all");
@@ -168,7 +168,7 @@ test!(package_verbose {
 ",
         packaging = PACKAGING,
         archiving = ARCHIVING).as_slice()));
-})
+});
 
 test!(package_verification {
     let p = project("all")
@@ -193,4 +193,4 @@ test!(package_verification {
         verifying = VERIFYING,
         compiling = COMPILING,
         dir = p.url()).as_slice()));
-})
+});
index 8813a4994b0a06824f8c06383d6267bf5acd6be6..ccd29cb12a53c72ac68085cd8a7a76c7e8ffd9c4 100644 (file)
@@ -42,7 +42,7 @@ running = RUNNING, compiling = COMPILING, sep = path::SEP,
 dir = p.root().display(),
 url = p.url(),
 )));
-})
+});
 
 test!(top_level_overrides_deps {
     let mut p = project("foo");
@@ -112,4 +112,4 @@ test!(top_level_overrides_deps {
                     sep = path::SEP,
                     prefix = os::consts::DLL_PREFIX,
                     suffix = os::consts::DLL_SUFFIX).as_slice()));
-})
+});
index cfeae4e224f07d685f7bab50895c0209bb9559cf..ac8f5c74e371720790c93454e80ae3cd2d4071a1 100644 (file)
@@ -75,7 +75,7 @@ test!(simple {
                 fname == b"foo-0.0.1/src/main.rs",
                 "unexpected filename: {}", file.filename())
     }
-})
+});
 
 test!(git_deps {
     let p = project("foo")
@@ -97,7 +97,7 @@ test!(git_deps {
 all dependencies must come from the same source.
 dependency `foo` comes from git://path/to/nowhere instead
 "));
-})
+});
 
 test!(path_dependency_no_version {
     let p = project("foo")
@@ -126,4 +126,4 @@ test!(path_dependency_no_version {
 all path dependencies must have a version specified when publishing.
 dependency `bar` does not specify a version
 "));
-})
+});
index 2b47923590ae8a5b3be3d4963d47e8f8d49f1c85..3c7abcb517bbd310ae38e0780c6cfae316148ba9 100644 (file)
@@ -51,7 +51,7 @@ test!(simple {
         updating = UPDATING,
         dir = p.url(),
         reg = r::registry()).as_slice()));
-})
+});
 
 test!(deps {
     let p = project("foo")
@@ -83,7 +83,7 @@ test!(deps {
         compiling = COMPILING,
         dir = p.url(),
         reg = r::registry()).as_slice()));
-})
+});
 
 test!(nonexistent {
     let p = project("foo")
@@ -104,7 +104,7 @@ no package named `nonexistent` found (required by `foo`)
 location searched: registry file://[..]
 version required: >= 0.0.0
 "));
-})
+});
 
 test!(bad_cksum {
     let p = project("foo")
@@ -132,7 +132,7 @@ Caused by:
 Caused by:
   Failed to verify the checksum of `bad-cksum v0.0.1 (registry file://[..])`
 "));
-})
+});
 
 test!(update_registry {
     let p = project("foo")
@@ -168,7 +168,7 @@ version required: >= 0.0.0
         compiling = COMPILING,
         dir = p.url(),
         reg = r::registry()).as_slice()));
-})
+});
 
 test!(package_with_path_deps {
     let p = project("foo")
@@ -223,7 +223,7 @@ version required: ^0.0.1
     compiling = COMPILING,
     dir = p.url(),
 )));
-})
+});
 
 test!(lockfile_locks {
     let p = project("foo")
@@ -255,7 +255,7 @@ test!(lockfile_locks {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(lockfile_locks_transitively {
     let p = project("foo")
@@ -291,7 +291,7 @@ test!(lockfile_locks_transitively {
 
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(yanks_are_not_used {
     let p = project("foo")
@@ -322,7 +322,7 @@ test!(yanks_are_not_used {
 {compiling} foo v0.0.1 ({dir})
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url()).as_slice()));
-})
+});
 
 test!(relying_on_a_yank_is_bad {
     let p = project("foo")
@@ -348,7 +348,7 @@ no package named `baz` found (required by `bar`)
 location searched: registry file://[..]
 version required: = 0.0.2
 "));
-})
+});
 
 test!(yanks_in_lockfiles_are_ok {
     let p = project("foo")
@@ -382,7 +382,7 @@ no package named `bar` found (required by `foo`)
 location searched: registry file://[..]
 version required: *
 "));
-})
+});
 
 test!(update_with_lockfile_if_packages_missing {
     let p = project("foo")
@@ -409,7 +409,7 @@ test!(update_with_lockfile_if_packages_missing {
 {updating} registry `[..]`
 {downloading} bar v0.0.1 (registry file://[..])
 ", updating = UPDATING, downloading = DOWNLOADING).as_slice()));
-})
+});
 
 test!(update_lockfile {
     let p = project("foo")
@@ -444,7 +444,7 @@ test!(update_lockfile {
 {compiling} foo v0.0.1 ({dir})
 ", downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url()).as_slice()));
-})
+});
 
 test!(dev_dependency_not_used {
     let p = project("foo")
@@ -471,7 +471,7 @@ test!(dev_dependency_not_used {
 {compiling} foo v0.0.1 ({dir})
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url()).as_slice()));
-})
+});
 
 test!(login_with_no_cargo_dir {
     let home = paths::home().join("new-home");
@@ -481,7 +481,7 @@ test!(login_with_no_cargo_dir {
                        .cwd(paths::root())
                        .env("HOME", Some(home)),
                 execs().with_status(0));
-})
+});
 
 test!(bad_license_file {
     let p = project("all")
@@ -501,7 +501,7 @@ test!(bad_license_file {
                 execs().with_status(101)
                        .with_stderr("\
 the license file `foo` does not exist"));
-})
+});
 
 test!(updating_a_dep {
     let p = project("foo")
@@ -560,7 +560,7 @@ test!(updating_a_dep {
 {compiling} foo v0.0.1 ({dir})
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url()).as_slice()));
-})
+});
 
 test!(git_and_registry_dep {
     let b = git::repo(&paths::root().join("b"))
@@ -609,7 +609,7 @@ test!(git_and_registry_dep {
     println!("second");
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0).with_stdout(""));
-})
+});
 
 test!(update_publish_then_update {
     let p = project("foo")
@@ -649,4 +649,4 @@ test!(update_publish_then_update {
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url()).as_slice()));
 
-})
+});
index a5c8de00bf3cfa08cbea7569a7f24ae5845b8e04..26ab98e205c73f87a8f82da9d5acdeb4a07b6ed0 100644 (file)
@@ -30,7 +30,7 @@ hello
         dir = path2url(p.root()),
         sep = path::SEP).as_slice()));
     assert_that(&p.bin("foo"), existing_file());
-})
+});
 
 test!(simple_with_args {
     let p = project("foo")
@@ -49,7 +49,7 @@ test!(simple_with_args {
 
     assert_that(p.cargo_process("run").arg("hello").arg("world"),
                 execs().with_status(0));
-})
+});
 
 test!(exit_code {
     let p = project("foo")
@@ -65,7 +65,7 @@ test!(exit_code {
 
     assert_that(p.cargo_process("run"),
                 execs().with_status(2));
-})
+});
 
 test!(no_main_file {
     let p = project("foo")
@@ -81,7 +81,7 @@ test!(no_main_file {
                 execs().with_status(101)
                        .with_stderr("a bin target must be available \
                                      for `cargo run`\n"));
-})
+});
 
 test!(too_many_bins {
     let p = project("foo")
@@ -100,7 +100,7 @@ test!(too_many_bins {
                        .with_stderr("`cargo run` requires that a project only \
                                      have one executable. Use the `--bin` option \
                                      to specify which one to run\n"));
-})
+});
 
 test!(specify_name {
     let p = project("foo")
@@ -138,7 +138,7 @@ hello b.rs
 ",
         running = RUNNING,
         sep = path::SEP).as_slice()));
-})
+});
 
 test!(run_example {
     let p = project("foo")
@@ -166,7 +166,7 @@ example
         running = RUNNING,
         dir = path2url(p.root()),
         sep = path::SEP).as_slice()));
-})
+});
 
 test!(either_name_or_example {
     let p = project("foo")
@@ -187,7 +187,7 @@ test!(either_name_or_example {
                 execs().with_status(1)
                        .with_stderr("specify either `--bin` or `--example`, \
                                      not both"));
-})
+});
 
 test!(one_bin_multiple_examples {
     let p = project("foo")
@@ -218,7 +218,7 @@ hello main.rs
         running = RUNNING,
         dir = path2url(p.root()),
         sep = path::SEP).as_slice()));
-})
+});
 
 test!(run_dylib_dep {
     let p = project("foo")
@@ -249,7 +249,7 @@ test!(run_dylib_dep {
 
     assert_that(p.cargo_process("run").arg("hello").arg("world"),
                 execs().with_status(0));
-})
+});
 
 test!(release_works {
     let p = project("foo")
@@ -273,7 +273,7 @@ test!(release_works {
         dir = path2url(p.root()),
         sep = path::SEP).as_slice()));
     assert_that(&p.release_bin("foo"), existing_file());
-})
+});
 
 test!(run_bin_different_name {
     let p = project("foo")
@@ -291,4 +291,4 @@ test!(run_bin_different_name {
         "#);
 
     assert_that(p.cargo_process("run"), execs().with_status(0));
-})
+});
index c2cf6a70512973c47b9e71f872b541cab0d0c2fb..664d062087fcf378b5ea9de3e831fbf54ac83b7e 100644 (file)
@@ -82,4 +82,4 @@ test!(simple {
                 execs().with_status(0).with_stdout(format!("\
 {updating} registry `[..]`
 hoare (0.1.1)    Design by contract style assertions for Rust", updating = UPDATING)));
-})
+});
index f065c17f01700fbdf108737a6114390c2162d319..ff0d23c54d10b14fa8c1d20ba66afe5bcb237c39 100644 (file)
@@ -46,7 +46,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 ",
         COMPILING, p.url(),
         RUNNING)));
-})
+});
 
 test!(cargo_test_verbose {
     let p = project("foo")
@@ -69,7 +69,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
 ",
         compiling = COMPILING, url = p.url(), running = RUNNING)));
-})
+});
 
 test!(many_similar_names {
     let p = project("foo")
@@ -98,7 +98,7 @@ test!(many_similar_names {
     assert!(output.contains("test bin_test"), "bin_test missing\n{}", output);
     assert!(output.contains("test lib_test"), "lib_test missing\n{}", output);
     assert!(output.contains("test test_test"), "test_test missing\n{}", output);
-})
+});
 
 test!(cargo_test_failing_test {
     let p = project("foo")
@@ -153,7 +153,7 @@ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
 task '<main>' panicked at 'Some tests failed', [..]
 "))
               .with_status(101));
-})
+});
 
 test!(test_with_lib_dep {
     let p = project("foo")
@@ -214,7 +214,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
 ",
         COMPILING, p.url(), running = RUNNING, doctest = DOCTEST)))
-})
+});
 
 test!(test_with_deep_lib_dep {
     let p = project("bar")
@@ -277,7 +277,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
                        compiling = COMPILING, running = RUNNING,
                        doctest = DOCTEST,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(external_test_explicit {
     let p = project("foo")
@@ -329,7 +329,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ",
         COMPILING, p.url(), running = RUNNING, doctest = DOCTEST)))
-})
+});
 
 test!(external_test_implicit {
     let p = project("foo")
@@ -377,7 +377,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ",
         COMPILING, p.url(), running = RUNNING, doctest = DOCTEST)))
-})
+});
 
 test!(dont_run_examples {
     let p = project("foo")
@@ -394,7 +394,7 @@ test!(dont_run_examples {
         "#);
     assert_that(p.cargo_process("test"),
                 execs().with_status(0));
-})
+});
 
 test!(pass_through_command_line {
     let p = project("foo")
@@ -452,7 +452,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
                        compiling = COMPILING, running = RUNNING,
                        doctest = DOCTEST,
                        dir = p.url()).as_slice()));
-})
+});
 
 // Regression test for running cargo-test twice with
 // tests in an rlib
@@ -472,7 +472,7 @@ test!(cargo_test_twice {
         assert_that(p.process(cargo_dir().join("cargo")).arg("test"),
                     execs().with_status(0));
     }
-})
+});
 
 test!(lib_bin_same_name {
     let p = project("foo")
@@ -522,7 +522,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ",
         COMPILING, p.url(), running = RUNNING, doctest = DOCTEST)))
-})
+});
 
 test!(lib_with_standard_name {
     let p = project("foo")
@@ -576,7 +576,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        doctest = DOCTEST, dir = p.url()).as_slice()));
-})
+});
 
 test!(lib_with_standard_name2 {
     let p = project("foo")
@@ -617,7 +617,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(bin_there_for_integration {
     let p = project("foo")
@@ -644,7 +644,7 @@ test!(bin_there_for_integration {
     let output = str::from_utf8(output.output.as_slice()).assert();
     assert!(output.contains("main_test ... ok"), "no main_test\n{}", output);
     assert!(output.contains("test_test ... ok"), "no test_test\n{}", output);
-})
+});
 
 test!(test_dylib {
     let p = project("foo")
@@ -746,7 +746,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
                        running = RUNNING,
                        doctest = DOCTEST)));
 
-})
+});
 
 test!(test_twice_with_build_cmd {
     let p = project("foo")
@@ -803,7 +803,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 ",
                        running = RUNNING,
                        doctest = DOCTEST)));
-})
+});
 
 test!(test_then_build {
     let p = project("foo")
@@ -843,7 +843,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
     assert_that(p.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0)
                        .with_stdout(""));
-})
+});
 
 test!(test_no_run {
     let p = project("foo")
@@ -865,7 +865,7 @@ test!(test_no_run {
 ",
                        compiling = COMPILING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(test_run_specific_bin_target {
     let prj = project("foo")
@@ -902,7 +902,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
     assert_that(prj.cargo_process("test").arg("--test").arg("bin2"),
         execs().with_status(0).with_stdout(expected_stdout.as_slice()));
-})
+});
 
 test!(test_run_specific_test_target {
     let prj = project("foo")
@@ -940,7 +940,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
     assert_that(prj.cargo_process("test").arg("--test").arg("b"),
         execs().with_status(0).with_stdout(expected_stdout.as_slice()));
-})
+});
 
 test!(test_no_harness {
     let p = project("foo")
@@ -970,7 +970,7 @@ test!(test_no_harness {
 ",
                        compiling = COMPILING, running = RUNNING,
                        dir = p.url()).as_slice()));
-})
+});
 
 test!(selective_testing {
     let p = project("foo")
@@ -1057,7 +1057,7 @@ running 0 tests
 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured\n
 ", compiling = COMPILING, running = RUNNING,
    dir = p.url()).as_slice()));
-})
+});
 
 test!(almost_cyclic_but_not_quite {
     let p = project("a")
@@ -1099,7 +1099,7 @@ test!(almost_cyclic_but_not_quite {
     assert_that(p.cargo_process("build"), execs().with_status(0));
     assert_that(p.process(cargo_dir().join("cargo")).arg("test"),
                 execs().with_status(0));
-})
+});
 
 test!(build_then_selective_test {
     let p = project("a")
@@ -1127,7 +1127,7 @@ test!(build_then_selective_test {
     assert_that(p.process(cargo_dir().join("cargo")).arg("test")
                  .arg("-p").arg("b"),
                 execs().with_status(0));
-})
+});
 
 test!(example_dev_dep {
     let p = project("foo")
@@ -1155,25 +1155,25 @@ test!(example_dev_dep {
         .file("bar/src/lib.rs", r#"
             #![feature(macro_rules)]
             // make sure this file takes awhile to compile
-            macro_rules! f0( () => (1u) )
-            macro_rules! f1( () => ({(f0!()) + (f0!())}) )
-            macro_rules! f2( () => ({(f1!()) + (f1!())}) )
-            macro_rules! f3( () => ({(f2!()) + (f2!())}) )
-            macro_rules! f4( () => ({(f3!()) + (f3!())}) )
-            macro_rules! f5( () => ({(f4!()) + (f4!())}) )
-            macro_rules! f6( () => ({(f5!()) + (f5!())}) )
-            macro_rules! f7( () => ({(f6!()) + (f6!())}) )
-            macro_rules! f8( () => ({(f7!()) + (f7!())}) )
-            macro_rules! f9( () => ({(f8!()) + (f8!())}) )
-            macro_rules! f10( () => ({(f9!()) + (f9!())}) )
-            macro_rules! f11( () => ({(f10!()) + (f10!())}) )
+            macro_rules! f0( () => (1u) );
+            macro_rules! f1( () => ({(f0!()) + (f0!())}) );
+            macro_rules! f2( () => ({(f1!()) + (f1!())}) );
+            macro_rules! f3( () => ({(f2!()) + (f2!())}) );
+            macro_rules! f4( () => ({(f3!()) + (f3!())}) );
+            macro_rules! f5( () => ({(f4!()) + (f4!())}) );
+            macro_rules! f6( () => ({(f5!()) + (f5!())}) );
+            macro_rules! f7( () => ({(f6!()) + (f6!())}) );
+            macro_rules! f8( () => ({(f7!()) + (f7!())}) );
+            macro_rules! f9( () => ({(f8!()) + (f8!())}) );
+            macro_rules! f10( () => ({(f9!()) + (f9!())}) );
+            macro_rules! f11( () => ({(f10!()) + (f10!())}) );
             pub fn bar() {
                 f11!();
             }
         "#);
     assert_that(p.cargo_process("test"),
                 execs().with_status(0));
-})
+});
 
 test!(selective_testing_with_docs {
     let p = project("foo")
@@ -1224,7 +1224,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ", compiling = COMPILING, running = RUNNING, dir = p.url(),
    doctest = DOCTEST).as_slice()));
-})
+});
 
 test!(example_bin_same_name {
     let p = project("foo")
@@ -1253,7 +1253,7 @@ test!(example_bin_same_name {
                 execs().with_status(0).with_stdout("bin\n"));
     assert_that(p.process(p.bin("examples/foo")),
                 execs().with_status(0).with_stdout("example\n"));
-})
+});
 
 test!(test_with_example_twice {
     let p = project("foo")
@@ -1274,4 +1274,4 @@ test!(test_with_example_twice {
     assert_that(p.process(cargo_dir().join("cargo")).arg("test").arg("-v"),
                 execs().with_status(0));
     assert_that(&p.bin("examples/foo"), existing_file());
-})
+});
index cca8e721b560b76e98d7a62eab10c8813495394b..7d8dc63360c17d7d3e4d03f9ada8477f6ea09dc2 100644 (file)
@@ -15,4 +15,4 @@ test!(simple {
                 execs().with_status(0).with_stdout(format!("{}\n",
         cargo::version()).as_slice()));
 
-})
+});
index a500d0827e005648141ff0368c52a754271a030e..76e821f0e2be830103a748f2d9eb88f7d4ebfddf 100644 (file)
@@ -24,7 +24,7 @@ test!(non_tty {
 
     let buf = rx.read_to_end().unwrap();
     assert_that(buf.as_slice(), shell_writes("Hey Alex\n"));
-})
+});
 
 test!(color_explicitly_disabled {
     let config = ShellConfig { color: false, verbose: true, tty: true };
@@ -35,7 +35,7 @@ test!(color_explicitly_disabled {
     });
     let buf = rx.read_to_end().unwrap();
     assert_that(buf.as_slice(), shell_writes("Hey Alex\n"));
-})
+});
 
 test!(colored_shell {
     let term = TerminfoTerminal::new(MemWriter::new());
@@ -51,7 +51,7 @@ test!(colored_shell {
     assert_that(buf.as_slice(),
                 shell_writes(colored_output("Hey Alex\n",
                                             color::RED).assert()));
-})
+});
 
 fn colored_output<S: Str>(string: S, color: color::Color) -> IoResult<String> {
     let mut term = TerminfoTerminal::new(MemWriter::new()).unwrap();
index a30e080664a2a5c0016e130847bed15b697fe01e..ca53267003ae3410b18997f2ad9bfe662c23c9e3 100644 (file)
@@ -14,7 +14,7 @@ extern crate url;
 extern crate log;
 
 mod support;
-macro_rules! test(
+macro_rules! test {
     ($name:ident $expr:expr) => (
         #[test]
         fn $name() {
@@ -23,7 +23,7 @@ macro_rules! test(
             $expr;
         }
     )
-)
+}
 
 mod test_cargo;
 mod test_cargo_bench;